1 // Copyright (c) 2003-2007, Jodd Team (jodd.sf.net). All Rights Reserved. 2 3 package jodd.typeconverter; 4 5 /** 6 * Object converter interface. 7 * 8 * @see jodd.typeconverter.TypeConverterManager 9 */ 10 public interface TypeConverter { 11 12 /** 13 * Converts object received as parameter into object of another class. 14 * For example, in a IntegerConverter implementation of this interface, 15 * this method should convert all objects into Integer object. Conversion has 16 * to be done correctly, with investigation of given object. 17 * <p> 18 * 19 * If conversion is not possible {@link TypeConversionException} should be thrown. 20 * 21 * @param obj object to convert from 22 * 23 * @return resulting object 24 */ 25 public Object convert(Object obj); 26 27 } 28