Package org.jboss.common.beans.property
Class StringArrayEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.jboss.common.beans.property.PropertyEditorSupport<T>
-
- org.jboss.common.beans.property.GenericArrayPropertyEditor<java.lang.String[]>
-
- org.jboss.common.beans.property.StringArrayEditor
-
- All Implemented Interfaces:
java.beans.PropertyEditor
,PropertyEditor<java.lang.String[]>
public class StringArrayEditor extends GenericArrayPropertyEditor<java.lang.String[]>
A property editor for String[]. The text format of a string array is a comma or \n, \r seperated list with \, representing an escaped comma to include in the string element.
-
-
Constructor Summary
Constructors Constructor Description StringArrayEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
encode(java.lang.String[] v)
void
setAsText(java.lang.String text)
Set the property value by parsing a given String.protected java.lang.String[]
tokenize(java.lang.String text)
-
Methods inherited from class org.jboss.common.beans.property.GenericArrayPropertyEditor
getAsText, getCellType, getTokenizer
-
Methods inherited from class org.jboss.common.beans.property.PropertyEditorSupport
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getType, getValue, removePropertyChangeListener, removePropertyChangeListener, setValue
-
-
-
-
Method Detail
-
setAsText
public void setAsText(java.lang.String text) throws java.lang.IllegalArgumentException
Description copied from interface:PropertyEditor
Set the property value by parsing a given String. May raise java.lang.IllegalArgumentException if either the String is badly formatted or if this kind of property can't be expressed as text.- Specified by:
setAsText
in interfacejava.beans.PropertyEditor
- Specified by:
setAsText
in interfacePropertyEditor<java.lang.String[]>
- Overrides:
setAsText
in classGenericArrayPropertyEditor<java.lang.String[]>
- Parameters:
text
- The string to be parsed.- Throws:
java.lang.IllegalArgumentException
-
tokenize
protected java.lang.String[] tokenize(java.lang.String text)
- Overrides:
tokenize
in classGenericArrayPropertyEditor<java.lang.String[]>
-
encode
protected java.lang.String encode(java.lang.String[] v)
- Overrides:
encode
in classGenericArrayPropertyEditor<java.lang.String[]>
-
-