public class StaticConversionExecutor extends java.lang.Object implements ConversionExecutor
Specifically, encapsulates knowledge about how to convert source objects to a specific target type using a specific converter.
| Constructor and Description |
|---|
StaticConversionExecutor(java.lang.Class<?> sourceClass,
java.lang.Class<?> targetClass,
Converter converter)
Creates a conversion executor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Object |
execute(java.lang.Object source)
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() |
public StaticConversionExecutor(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 conversionpublic java.lang.Class<?> getSourceClass()
getSourceClass in interface ConversionExecutorpublic java.lang.Class<?> getTargetClass()
getTargetClass in interface ConversionExecutorpublic Converter getConverter()
public java.lang.Object execute(java.lang.Object source)
throws ConversionExecutionException
ConversionExecutorexecute in interface ConversionExecutorsource - the source object to convertConversionExecutionExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object