|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Converter
A type converter converts objects from one type to another. They may support conversion of multiple source types to multiple target types.
Implementations of this interface are thread-safe.
Method Summary | |
---|---|
java.lang.Object |
convert(java.lang.Object source,
java.lang.Class targetClass,
ConversionContext context)
Convert the provided source object argument to an instance of the specified target class. |
java.lang.Class[] |
getSourceClasses()
The source classes this converter can convert from. |
java.lang.Class[] |
getTargetClasses()
The target classes this converter can convert to. |
Method Detail |
---|
java.lang.Class[] getSourceClasses()
java.lang.Class[] getTargetClasses()
java.lang.Object convert(java.lang.Object source, java.lang.Class targetClass, ConversionContext context) throws ConversionException
source
- the source object to convert, its class must be one of the supported sourceClasses
targetClass
- the target class to convert the source to, must be one of the supported
targetClasses
context
- an optional conversion context that may be used to influence the conversion process
ConversionException
- an exception occured during the conversion
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |