|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
S - The source object typeT - The target object typepublic interface Converter<S,T>
Converter interface. Classes implement this interface to convert one Java object type to another.
| Method Summary | |
|---|---|
boolean |
canConvert(Class<?> sourceClass,
Class<?> targetClass)
Returns true if this object can convert
sourceClass to targetClass. |
T |
convert(S obj)
Converts obj to T. |
Class<?> |
getSourceClass()
Returns the source Class for this converter. |
Class<?> |
getTargetClass()
Returns the target Class for this converter. |
| Method Detail |
|---|
boolean canConvert(Class<?> sourceClass,
Class<?> targetClass)
true if this object can convert
sourceClass to targetClass.
Implementations can accomodate class hierarchy ranges by converting super classes or interfaces.
sourceClass - The source ClasstargetClass - The target Class
true if this object can convert
sourceClass to targetClass.
T convert(S obj)
throws ConversionException
obj to T.
obj - The source Object to convert
Object
ConversionExceptionClass<?> getSourceClass()
Class for this converter.
Class for this converterClass<?> getTargetClass()
Class for this converter.
Class for this converter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||