public abstract class AbstractConverter extends PropertyEditorSupport implements Converter
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConverter(Class type)
Creates an abstract converter for the specified type.
|
protected |
AbstractConverter(Class type,
boolean trim) |
| Modifier and Type | Method and 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.
|
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, getCustomEditor, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditorprotected AbstractConverter(Class type)
type - type of the property editorprotected AbstractConverter(Class type, boolean trim)
public final Class getType()
Converterpublic final String getAsText()
getAsText in interface PropertyEditorgetAsText in class PropertyEditorSupportpublic final void setAsText(String text)
setAsText in interface PropertyEditorsetAsText in class PropertyEditorSupportpublic final Object getValue()
getValue in interface PropertyEditorgetValue in class PropertyEditorSupportpublic final void setValue(Object value)
setValue in interface PropertyEditorsetValue in class PropertyEditorSupportpublic final String toString(Object value)
Converterpublic final Object toObject(String text)
Converterprotected String toStringImpl(Object value)
value - an instance of the editor typeCopyright © 2005–2022 The Apache Software Foundation. All rights reserved.