|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Converter<T>
Interface to be implemented by objects responsible for any necessary type conversion.
Instances implementing this interface will be registered in ReflectionFactory
instances and will be used in TypeContext, MethodInvoker and
Property instances created by that factory.
| Method Summary | |
|---|---|
T |
convert(Object value,
TypeContext typeContext)
Converts the given value to the target type of this converter. |
boolean |
supports(Class<?> type)
Checks if this converter can convert instances of the given class to the target type of this converter. |
| Method Detail |
|---|
boolean supports(Class<?> type)
type - the class to be checked
T convert(Object value,
TypeContext typeContext)
throws ConversionException
Converter<Collection>) the given TypeContext might provide information for the
exact nature of the Collection (like List<String>).
value - the value to be convertedtypeContext - additional information for the required type of the converted value
ConversionException - if the conversion fails
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||