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, supportsCustomEditor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, getCustomEditor, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditor
protected ConverterSupport(Class type)
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 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-2013 Sonatype. All Rights Reserved.