|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.beans.PropertyEditorSupport
org.apache.xbean.propertyeditor.AbstractConverter
public abstract class AbstractConverter
A base class for converters. This class handles all converter methods, and redirects all conversion requests to toStringImpl and toObjectImpl. These methods can assume that the supplied value or text is never null, and that type checking has been applied to the value.
| Constructor Summary | |
|---|---|
protected |
AbstractConverter(Class type)
Creates an abstract converter for the specified type. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.beans.PropertyEditorSupport |
|---|
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.beans.PropertyEditor |
|---|
addPropertyChangeListener, getCustomEditor, getJavaInitializationString, getTags, isPaintable, paintValue, removePropertyChangeListener, supportsCustomEditor |
| Constructor Detail |
|---|
protected AbstractConverter(Class type)
type - type of the property editor| Method Detail |
|---|
public final Class getType()
Converter
getType in interface 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)
Converter
toString in interface Convertervalue - an instance of the editor type
public final Object toObject(String text)
Converter
toObject in interface Convertertext - the text to convert
protected String toStringImpl(Object value)
value - an instance of the editor type
protected abstract Object toObjectImpl(String text)
text - the text to convert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||