001    package biz.hammurapi.convert;
002    
003    import biz.hammurapi.config.Context;
004    
005    /**
006     * Converts objects from one type to another, e.g. Integer to String.
007     * @author Pavel
008     *
009     */
010    public interface Converter {
011    
012            /**
013             * Converts object to requested target type.
014             * @param source Source object.
015             * @param targetType Target type.
016             * @param context Conversion context.
017             * @return Converted object.
018             */
019            Object convert(Object source, Class targetType, Context context) throws ConversionException;
020    }