| org.strecks.converter.Converter
Converter | public interface Converter (Code) | | Defines interface for converting from a String to an Object (which can be bound to a richly typed property in a
domain class). Converters are typically one of two types:
- Generic converters which use an underlying conversion library (e.g. Commons BeanUtils or OGNL) to
perform conversion
- Specific converters which apply a custom conversion
author: Phil Zoio |
setTargetClass | public void setTargetClass(Class clazz)(Code) | | Identifies the target class for the conversion. For generic converters this may be used by the conversion
library to determine the target type for the conversion. For specific converters this will typically just
to apply a runtime check to ensure that the passed in object in convertToString() is of the
correct type
|
toSourceType | public S toSourceType(T toConvert) throws ConversionException(Code) | | Performs reverse of convertToObject() : returns the original type representation of the object,
typically used as the value which will appear as a form input field
|
toTargetType | public T toTargetType(S toConvert) throws ConversionException(Code) | | Converts from a String to an object, which can be bound as a property of a richly typed domain class
|
|
|