Spring Web Flow

org.springframework.binding.convert.converters
Interface TwoWayConverter

All Superinterfaces:
Converter
All Known Implementing Classes:
ArrayToCollection, FormattedStringToNumber, PropertyEditorConverter, StringToBigDecimal, StringToBigInteger, StringToBoolean, StringToByte, StringToCharacter, StringToClass, StringToDate, StringToDouble, StringToEnum, StringToFloat, StringToInteger, StringToLabeledEnum, StringToLocale, StringToLong, StringToObject, StringToShort

public interface TwoWayConverter
extends Converter

A converter that can also convert from the target back to the source.

Author:
Keith Donald

Method Summary
 java.lang.Object convertTargetToSourceClass(java.lang.Object target, java.lang.Class<?> sourceClass)
          Convert the provided target object argument to an instance of the specified source class.
 
Methods inherited from interface org.springframework.binding.convert.converters.Converter
convertSourceToTargetClass, getSourceClass, getTargetClass
 

Method Detail

convertTargetToSourceClass

java.lang.Object convertTargetToSourceClass(java.lang.Object target,
                                            java.lang.Class<?> sourceClass)
                                            throws java.lang.Exception
Convert the provided target object argument to an instance of the specified source class.

Parameters:
target - the target object to convert, which must be an instance of Converter.getTargetClass()
sourceClass - the source class to convert the target to, which must be equal to or a specialization of Converter.getSourceClass()
Returns:
the converted object, which must be an instance of the sourceClass
Throws:
java.lang.Exception - an exception occurred performing the conversion

Spring Web Flow