|
||||||||||
| 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(java.lang.Class type)
Creates an abstract converter for the specified type. |
protected |
AbstractConverter(java.lang.Class type,
boolean trim)
|
| Method Summary | |
|---|---|
java.lang.String |
getAsText()
|
java.lang.Class |
getType()
Gets the the type of object supported by this converter. |
java.lang.Object |
getValue()
|
void |
setAsText(java.lang.String text)
|
void |
setValue(java.lang.Object value)
|
java.lang.Object |
toObject(java.lang.String text)
Converts the supplied text in to an instance of the editor type. |
protected abstract java.lang.Object |
toObjectImpl(java.lang.String text)
Converts the supplied text in to an instance of the editor type. |
java.lang.String |
toString(java.lang.Object value)
Converts the supplied object to text. |
protected java.lang.String |
toStringImpl(java.lang.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(java.lang.Class type)
type - type of the property editor
protected AbstractConverter(java.lang.Class type,
boolean trim)
| Method Detail |
|---|
public final java.lang.Class getType()
Converter
getType in interface Converterpublic final java.lang.String getAsText()
getAsText in interface java.beans.PropertyEditorgetAsText in class java.beans.PropertyEditorSupportpublic final void setAsText(java.lang.String text)
setAsText in interface java.beans.PropertyEditorsetAsText in class java.beans.PropertyEditorSupportpublic final java.lang.Object getValue()
getValue in interface java.beans.PropertyEditorgetValue in class java.beans.PropertyEditorSupportpublic final void setValue(java.lang.Object value)
setValue in interface java.beans.PropertyEditorsetValue in class java.beans.PropertyEditorSupportpublic final java.lang.String toString(java.lang.Object value)
Converter
toString in interface Convertervalue - an instance of the editor type
public final java.lang.Object toObject(java.lang.String text)
Converter
toObject in interface Convertertext - the text to convert
protected java.lang.String toStringImpl(java.lang.Object value)
value - an instance of the editor type
protected abstract java.lang.Object toObjectImpl(java.lang.String text)
text - the text to convert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||