001    /*
002     @license.text@
003      */
004    package com.hammurapi.convert;
005    
006    import com.hammurapi.util.Context;
007    
008    /**
009     * Part of composite decorators.
010     * @author Pavel Vlasov
011     *
012     * @version $Revision: 1.1 $
013     */
014    public interface AtomicDecorator<S> {
015            
016            /**
017             * @return Type which converter converts from.
018             */
019            Class<S> getSourceType();
020            
021            /**
022             * Creates decoration.
023             * @param source Source object.
024             * @param master Master decorator to delegate decoration 
025             * of object parts.
026             * @return Decoration or null.
027             */
028            Object decorate(S source, Context context, Decorator<?, ?> master);
029    }