PropertyEditor
, Converter
AbstractCollectionConverter
, AbstractMapConverter
, BigDecimalEditor
, BigIntegerEditor
, BooleanEditor
, ByteEditor
, CharacterEditor
, ClassEditor
, CommonsLoggingConverter
, DateEditor
, DoubleEditor
, EnumConverter
, FileEditor
, FloatEditor
, Inet4AddressEditor
, Inet6AddressEditor
, InetAddressEditor
, IntegerEditor
, JndiConverter
, Log4jConverter
, LoggerConverter
, LongEditor
, ObjectNameEditor
, PatternConverter
, ShortEditor
, StringEditor
, URIEditor
, URLEditor
public abstract class AbstractConverter extends PropertyEditorSupport implements Converter
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractConverter(Class type) |
Creates an abstract converter for the specified type.
|
protected |
AbstractConverter(Class type,
boolean trim) |
Modifier and Type | Method | Description |
---|---|---|
String |
getAsText() |
|
Class |
getType() |
Gets the the type of object supported by this converter.
|
Object |
getValue() |
|
void |
setAsText(String text) |
|
void |
setValue(Object value) |
|
Object |
toObject(String text) |
Converts the supplied text in to an instance of the editor type.
|
protected abstract Object |
toObjectImpl(String text) |
Converts the supplied text in to an instance of the editor type.
|
String |
toString(Object value) |
Converts the supplied object to text.
|
protected String |
toStringImpl(Object value) |
Converts the supplied object to text.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, getCustomEditor, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditor
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
protected AbstractConverter(Class type)
type
- type of the property editorprotected AbstractConverter(Class type, boolean trim)
public final Class getType()
Converter
public final String getAsText()
getAsText
in interface PropertyEditor
getAsText
in class PropertyEditorSupport
public final void setAsText(String text)
setAsText
in interface PropertyEditor
setAsText
in class PropertyEditorSupport
public final Object getValue()
getValue
in interface PropertyEditor
getValue
in class PropertyEditorSupport
public final void setValue(Object value)
setValue
in interface PropertyEditor
setValue
in class PropertyEditorSupport
public final String toString(Object value)
Converter
public final Object toObject(String text)
Converter
protected String toStringImpl(Object value)
value
- an instance of the editor typeCopyright © 2005–2018. All rights reserved.