Package org.apache.xbean.propertyeditor
Class AbstractCollectionConverter
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.apache.xbean.propertyeditor.AbstractConverter
-
- org.apache.xbean.propertyeditor.AbstractCollectionConverter
-
- All Implemented Interfaces:
java.beans.PropertyEditor
,Converter
- Direct Known Subclasses:
ArrayConverter
,ArrayListEditor
,GenericCollectionConverter
,LinkedHashSetEditor
,LinkedListEditor
,ListEditor
,PrototypeArrayConverter
,SetEditor
,SortedSetEditor
,TreeSetEditor
,VectorEditor
public abstract class AbstractCollectionConverter extends AbstractConverter
- Version:
- $Rev: 6687 $ $Date: 2005-12-28T21:08:56.733437Z $
-
-
Field Summary
Fields Modifier and Type Field Description private java.beans.PropertyEditor
editor
-
Constructor Summary
Constructors Constructor Description AbstractCollectionConverter(java.lang.Class type)
AbstractCollectionConverter(java.lang.Class type, java.beans.PropertyEditor editor)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.Object
createCollection(java.util.List list)
protected java.beans.PropertyEditor
getEditor()
protected java.lang.Object
toObjectImpl(java.lang.String text)
Converts the supplied text in to an instance of the editor type.protected java.lang.String
toStringImpl(java.lang.Object value)
Converts the supplied object to text.-
Methods inherited from class org.apache.xbean.propertyeditor.AbstractConverter
getAsText, getType, getValue, setAsText, setValue, toObject, toString
-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
-
-
-
-
Method Detail
-
toObjectImpl
protected final java.lang.Object toObjectImpl(java.lang.String text)
Description copied from class:AbstractConverter
Converts the supplied text in to an instance of the editor type. The text will never be null, and trim() will already have been called.- Specified by:
toObjectImpl
in classAbstractConverter
- Parameters:
text
- the text to convert- Returns:
- an instance of the editor type
-
createCollection
protected abstract java.lang.Object createCollection(java.util.List list)
-
toStringImpl
protected final java.lang.String toStringImpl(java.lang.Object value)
Description copied from class:AbstractConverter
Converts the supplied object to text. The supplied object will always be an instance of the editor type, and specifically will never be null or a String (unless this is the String editor).- Overrides:
toStringImpl
in classAbstractConverter
- Parameters:
value
- an instance of the editor type- Returns:
- the text equivalent of the value
-
getEditor
protected java.beans.PropertyEditor getEditor()
-
-