001 /* 002 @license.text@ 003 */ 004 package biz.hammurapi.convert; 005 006 import biz.hammurapi.config.Context; 007 008 /** 009 * Part of composite converters which converts one type to another. 010 * @author Pavel Vlasov 011 * 012 * @version $Revision: 1.1 $ 013 */ 014 public interface AtomicConverter { 015 016 /** 017 * @return Type which converter converts from. 018 */ 019 Class getSourceType(); 020 021 /** 022 * @return Type which converter converts to. 023 */ 024 Class getTargetType(); 025 026 /** 027 * Converts object to target type. 028 * @param source Source object. 029 * @param master Master converter to delegate conversion 030 * of object parts. 031 * @return Converted object. 032 */ 033 Object convert(Object source, Converter master, Context context); 034 }