org.springframework.binding.convert.service
Class RuntimeBindingConversionExecutor

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

public class RuntimeBindingConversionExecutor
extends java.lang.Object
implements ConversionExecutor

A conversion executor that doesn't resolve its converter until its time to perform a conversion.

Author:
Keith Donald

Constructor Summary
RuntimeBindingConversionExecutor(java.lang.Class targetClass, ConversionService conversionService)
          Creates a new runtime binding conversion executor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Object execute(java.lang.Object source)
          Execute the conversion for the provided source object.
 java.lang.Object execute(java.lang.Object source, java.lang.Object context)
           
 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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuntimeBindingConversionExecutor

public RuntimeBindingConversionExecutor(java.lang.Class targetClass,
                                        ConversionService conversionService)
Creates a new runtime binding conversion executor.

Parameters:
targetClass - the target type to convert to
conversionService - the conversion service to get converters from
Method Detail

getSourceClass

public java.lang.Class getSourceClass()
Description copied from interface: ConversionExecutor
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()
Description copied from interface: ConversionExecutor
Returns the target class of conversions performed by this executor.

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

equals

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

hashCode

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

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

execute

public java.lang.Object execute(java.lang.Object source,
                                java.lang.Object context)
                         throws ConversionExecutionException
Throws:
ConversionExecutionException