Class StaticConversionExecutor
java.lang.Object
org.springframework.binding.convert.service.StaticConversionExecutor
- All Implemented Interfaces:
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.
- Author:
- Keith Donald
-
Constructor Summary
ConstructorDescriptionStaticConversionExecutor
(Class<?> sourceClass, Class<?> targetClass, Converter converter) Creates a conversion executor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Execute the conversion for the provided source object.Returns the converter that will perform the conversion.Class<?>
Returns the source class of conversions performed by this executor.Class<?>
Returns the target class of conversions performed by this executor.int
hashCode()
toString()
-
Constructor Details
-
StaticConversionExecutor
Creates a conversion executor.- Parameters:
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 conversion
-
-
Method Details
-
getSourceClass
Returns the source class of conversions performed by this executor.- Specified by:
getSourceClass
in interfaceConversionExecutor
- Returns:
- the source class
-
getTargetClass
Returns the target class of conversions performed by this executor.- Specified by:
getTargetClass
in interfaceConversionExecutor
- Returns:
- the target class
-
getConverter
Returns the converter that will perform the conversion.- Returns:
- the converter
-
execute
Description copied from interface:ConversionExecutor
Execute the conversion for the provided source object.- Specified by:
execute
in interfaceConversionExecutor
- Parameters:
source
- the source object to convert- Throws:
ConversionExecutionException
-
equals
-
hashCode
public int hashCode() -
toString
-