java.beans.PropertyEditor
, Converter
AbstractCollectionConverter
, AbstractMapConverter
, BigDecimalEditor
, BigIntegerEditor
, BooleanEditor
, ByteEditor
, CharacterEditor
, ClassEditor
, CommonsLoggingConverter
, DateEditor
, DoubleEditor
, EnumConverter
, FileEditor
, FloatEditor
, Inet4AddressEditor
, Inet6AddressEditor
, InetAddressEditor
, IntegerEditor
, JndiConverter
, Log4jConverter
, LoggerConverter
, LongEditor
, ObjectNameEditor
, PatternConverter
, ShortEditor
, StringEditor
, URIEditor
, URLEditor
public abstract class AbstractConverter extends java.beans.PropertyEditorSupport implements Converter
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractConverter(java.lang.Class type) |
Creates an abstract converter for the specified type.
|
protected |
AbstractConverter(java.lang.Class type,
boolean trim) |
Modifier and Type | Method | Description |
---|---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected AbstractConverter(java.lang.Class type)
type
- type of the property editorprotected AbstractConverter(java.lang.Class type, boolean trim)
public final java.lang.Class getType()
Converter
public final java.lang.String getAsText()
getAsText
in interface java.beans.PropertyEditor
getAsText
in class java.beans.PropertyEditorSupport
public final void setAsText(java.lang.String text)
setAsText
in interface java.beans.PropertyEditor
setAsText
in class java.beans.PropertyEditorSupport
public final java.lang.Object getValue()
getValue
in interface java.beans.PropertyEditor
getValue
in class java.beans.PropertyEditorSupport
public final void setValue(java.lang.Object value)
setValue
in interface java.beans.PropertyEditor
setValue
in class java.beans.PropertyEditorSupport
public final java.lang.String toString(java.lang.Object value)
Converter
public final java.lang.Object toObject(java.lang.String text)
Converter
protected java.lang.String toStringImpl(java.lang.Object value)
value
- an instance of the editor typeprotected abstract java.lang.Object toObjectImpl(java.lang.String text)
text
- the text to convertCopyright © 2005–2018. All rights reserved.