001/* 002 @license.text@ 003 */ 004package com.hammurapi.convert; 005 006import com.hammurapi.common.Context; 007 008/** 009 * Part of composite decorators. 010 * @author Pavel Vlasov 011 * 012 * @version $Revision: 1.1 $ 013 */ 014public 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}