|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Converter
Type converter to convert an object to a target type.
Method Summary | |
---|---|
boolean |
canConvert(Object sourceObject,
ReifiedType targetType)
Return if this converter is able to convert the specified object to the specified type. |
Object |
convert(Object sourceObject,
ReifiedType targetType)
Convert the specified object to an instance of the specified type. |
Method Detail |
---|
boolean canConvert(Object sourceObject, ReifiedType targetType)
sourceObject
- The source object s
to convert.targetType
- The target type T
.
true
if the conversion is possible,
false
otherwise.Object convert(Object sourceObject, ReifiedType targetType) throws Exception
sourceObject
- The source object s
to convert.targetType
- The target type T
.
Exception
- If the conversion cannot succeed. This exception should
not be thrown when the canConvert
method has
returned true
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |