public abstract class ConverterSupport extends PropertyEditorSupport implements Converter
Converter implementations.| Modifier | Constructor and Description |
|---|---|
protected |
ConverterSupport(Class type) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Object |
convertToObject(String text)
Converts the supplied text in to an instance of the editor type.
|
protected String |
convertToString(Object value)
Converts the supplied object to text.
|
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.
|
String |
toString(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 ConverterSupport(Class type)
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 convertToString(Object value)
value - an instance of the editor typeprotected abstract Object convertToObject(String text) throws Exception
text - The text to convertToObjectException - Conversion failedCopyright © 2008-2012 Sonatype. All Rights Reserved.