Spring Web Flow

org.springframework.binding.convert.service
Class StaticConversionExecutor

java.lang.Object
  extended by org.springframework.binding.convert.service.StaticConversionExecutor
All Implemented Interfaces:
ConversionExecutor

public class StaticConversionExecutor
extends java.lang.Object
implements 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
StaticConversionExecutor(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.
 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

StaticConversionExecutor

public StaticConversionExecutor(java.lang.Class<?> sourceClass,
                                java.lang.Class<?> targetClass,
                                Converter converter)
Creates a conversion executor.

Parameters:
sourceClass - the source type that the converter will convert from
targetClass - the target type that the converter will convert to
converter - the converter that will perform the conversion
Method Detail

getSourceClass

public java.lang.Class<?> getSourceClass()
Returns the source class of conversions performed by this executor.

Specified by:
getSourceClass in interface ConversionExecutor
Returns:
the source class

getTargetClass

public java.lang.Class<?> getTargetClass()
Returns the target class of conversions performed by this executor.

Specified by:
getTargetClass in interface ConversionExecutor
Returns:
the target class

getConverter

public Converter getConverter()
Returns the converter that will perform the conversion.

Returns:
the converter

execute

public java.lang.Object execute(java.lang.Object source)
                         throws ConversionExecutionException
Description copied from interface: ConversionExecutor
Execute the conversion for the provided source object.

Specified by:
execute in interface ConversionExecutor
Parameters:
source - the source object to convert
Throws:
ConversionExecutionException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Spring Web Flow