org.apache.geronimo.common.propertyeditor
Class AbstractCollectionEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.apache.geronimo.common.propertyeditor.AbstractCollectionEditor
All Implemented Interfaces:
PropertyEditor
Direct Known Subclasses:
ArrayListEditor, CollectionEditor, HashSetEditor, LinkedListEditor, ListEditor, SetEditor, StackEditor, TreeSetEditor, VectorEditor

public abstract class AbstractCollectionEditor
extends PropertyEditorSupport

An abstract collection editor. Subclasses should provide the correct type of collection from the createCollection method and should override setValue to check the type of the value.


Constructor Summary
AbstractCollectionEditor()
           
 
Method Summary
protected abstract  Collection createCollection()
          Concrete subclasses should implement this method to create the correct type of collection.
 void setAsText(String text)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCollectionEditor

public AbstractCollectionEditor()
Method Detail

createCollection

protected abstract Collection createCollection()
Concrete subclasses should implement this method to create the correct type of collection.

Returns:
an empty instance of the type of collection the subclass edits.

setAsText

public void setAsText(String text)
Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.