org.loom.converter
Class AbstractStringConverter
java.lang.Object
org.loom.converter.AbstractConverter
org.loom.converter.AbstractStringConverter
- All Implemented Interfaces:
- Converter, FormInputDecorator
- Direct Known Subclasses:
- AbstractFormatConverter, AbstractSimpleConverter, AbstractSimpleNumberConverter
public abstract class AbstractStringConverter
- extends AbstractConverter
A class that must be able to perform the conversion from and to
a String value.
- Author:
- Ignacio Coloma
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStringConverter
protected AbstractStringConverter(java.lang.Class<?> convertedClass)
getAsObject
public final java.lang.Object getAsObject(ParameterValue value,
Messages messages,
MessagesRepository repository)
- Return the object value for the given text
- Specified by:
getAsObject in interface Converter- Specified by:
getAsObject in class AbstractConverter
- Parameters:
value - the value that is being parsed
- Returns:
- the parsed value (can be null), maybe ading new values to the errors array
getAsObjectImpl
protected abstract java.lang.Object getAsObjectImpl(ParameterValue value,
Messages messages,
MessagesRepository repository)
- This method is the getAsObject implementation, and has the guarantee that the value is not null
getAsText
public final java.lang.String getAsText(java.lang.Object value,
MessagesRepository repository)
- Return the text value for the given object
- Parameters:
value - the java object to convert to textrepository - the MessagesRepository object
- Returns:
- the parsed value (can be null)
getAsTextImpl
protected java.lang.String getAsTextImpl(java.lang.Object value,
MessagesRepository repository)
- This method is the getAsText implementation, and has the guarantee that the value is not null
The Loom Framework 1.6-SNAPSHOT.
Licensed under the Apache License, Version 2.0 by Extrema Sistemas de Informacion S.L.