|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.binding.convert.converters.StringToObject
public abstract class StringToObject
Constructor Summary | |
---|---|
StringToObject(Class objectClass)
|
Method Summary | |
---|---|
Object |
convertSourceToTargetClass(Object source,
Class targetClass)
Convert the provided source object argument to an instance of the specified target class. |
Object |
convertTargetToSourceClass(Object target,
Class sourceClass)
Convert the provided target object argument to an instance of the specified source class. |
Class |
getSourceClass()
The source class this converter can convert from. |
Class |
getTargetClass()
The target class this converter can convert to. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringToObject(Class objectClass)
Method Detail |
---|
public final Class getSourceClass()
Converter
getSourceClass
in interface Converter
public final Class getTargetClass()
Converter
getTargetClass
in interface Converter
public final Object convertSourceToTargetClass(Object source, Class targetClass) throws Exception
Converter
convertSourceToTargetClass
in interface Converter
source
- the source object to convert, which must be an instance of Converter.getSourceClass()
targetClass
- the target class to convert the source to, which must be equal to or a specialization of
Converter.getTargetClass()
targetClass
Exception
- an exception occurred performing the conversionpublic final Object convertTargetToSourceClass(Object target, Class sourceClass) throws Exception
TwoWayConverter
convertTargetToSourceClass
in interface TwoWayConverter
target
- the target object to convert, which must be an instance of Converter.getTargetClass()
sourceClass
- the source class to convert the target to, which must be equal to or a specialization of
Converter.getSourceClass()
sourceClass
Exception
- an exception occurred performing the conversion
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |