|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.binding.convert.converters.StringToObject
public abstract class StringToObject
Constructor Summary | |
---|---|
StringToObject(java.lang.Class<?> objectClass)
|
Method Summary | |
---|---|
java.lang.Object |
convertSourceToTargetClass(java.lang.Object source,
java.lang.Class<?> targetClass)
Convert the provided source object argument to an instance of the specified target class. |
java.lang.Object |
convertTargetToSourceClass(java.lang.Object target,
java.lang.Class<?> sourceClass)
Convert the provided target object argument to an instance of the specified source class. |
java.lang.Class<?> |
getSourceClass()
The source class this converter can convert from. |
java.lang.Class<?> |
getTargetClass()
The target class this converter can convert to. |
protected abstract java.lang.Object |
toObject(java.lang.String string,
java.lang.Class<?> targetClass)
|
protected abstract java.lang.String |
toString(java.lang.Object object)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringToObject(java.lang.Class<?> objectClass)
Method Detail |
---|
public final java.lang.Class<?> getSourceClass()
Converter
getSourceClass
in interface Converter
public final java.lang.Class<?> getTargetClass()
Converter
getTargetClass
in interface Converter
public final java.lang.Object convertSourceToTargetClass(java.lang.Object source, java.lang.Class<?> targetClass) throws java.lang.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
java.lang.Exception
- an exception occurred performing the conversionpublic final java.lang.Object convertTargetToSourceClass(java.lang.Object target, java.lang.Class<?> sourceClass) throws java.lang.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
java.lang.Exception
- an exception occurred performing the conversionprotected abstract java.lang.Object toObject(java.lang.String string, java.lang.Class<?> targetClass) throws java.lang.Exception
java.lang.Exception
protected abstract java.lang.String toString(java.lang.Object object) throws java.lang.Exception
java.lang.Exception
|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |