Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.geronimo.common.propertyeditor
Class AbstractCollectionEditor  view AbstractCollectionEditor download AbstractCollectionEditor.java

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

public abstract class AbstractCollectionEditor
extends java.beans.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.

Version:
$Rev: $ $Date: $

Field Summary
 
Fields inherited from class java.beans.PropertyEditorSupport
 
Constructor Summary
AbstractCollectionEditor()
           
 
Method Summary
protected abstract  java.util.Collection createCollection()
          Concrete subclasses should implement this method to create the correct type of collection.
 void setAsText(java.lang.String text)
          Sets the value as 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 java.util.Collection createCollection()
Concrete subclasses should implement this method to create the correct type of collection.


setAsText

public void setAsText(java.lang.String text)
Description copied from class: java.beans.PropertyEditorSupport
Sets the value as text. In this class, you cannot count on setAsText() doing anything useful across implementations. Implementation Note: In this implementation it checks if the String is "null", and if it is, sets the value to null, otherwise it throws an IllegalArgumentException.