|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.binding.convert.ConversionExecutor
public class ConversionExecutor
A command object that is parameterized with the information necessary to perform a conversion of a source input to a target output.
Specifically, encapsulates knowledge about how to convert source objects to a specific target type using a specific converter.
Constructor Summary | |
---|---|
ConversionExecutor(java.lang.Class sourceClass,
java.lang.Class targetClass,
Converter converter)
Creates a conversion executor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
execute(java.lang.Object source)
Execute the conversion for the provided source object. |
java.lang.Object |
execute(java.lang.Object source,
ConversionContext context)
Execute the conversion for the provided source object. |
Converter |
getConverter()
Returns the converter that will perform the conversion. |
java.lang.Class |
getSourceClass()
Returns the source class of conversions performed by this executor. |
java.lang.Class |
getTargetClass()
Returns the target class of conversions performed by this executor. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConversionExecutor(java.lang.Class sourceClass, java.lang.Class targetClass, Converter converter)
sourceClass
- the source type that the converter will convert fromtargetClass
- the target type that the converter will convert toconverter
- the converter that will perform the conversionMethod Detail |
---|
public java.lang.Class getSourceClass()
public java.lang.Class getTargetClass()
public Converter getConverter()
public java.lang.Object execute(java.lang.Object source) throws ConversionException
source
- the source object to convert
ConversionException
public java.lang.Object execute(java.lang.Object source, ConversionContext context) throws ConversionException
source
- the source object to convertcontext
- the conversion context, useful for influencing the behavior of the converter
ConversionException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |