JBoss Common Beans 1.1.0.Final-redhat-1

org.jboss.common.beans.property
Class StringArrayEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.jboss.common.beans.property.PropertyEditorSupport<T>
          extended by org.jboss.common.beans.property.GenericArrayPropertyEditor<String[]>
              extended by org.jboss.common.beans.property.StringArrayEditor
All Implemented Interfaces:
PropertyEditor

public class StringArrayEditor
extends GenericArrayPropertyEditor<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.

Author:
Jason Dillon, Scott.Stark@jboss.org

Constructor Summary
StringArrayEditor()
           
 
Method Summary
protected  String encode(String[] v)
           
 void setAsText(String text)
          Set the property value by parsing a given String.
protected  String[] tokenize(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
 
Methods inherited from class java.beans.PropertyEditorSupport
firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, setSource, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringArrayEditor

public StringArrayEditor()
Method Detail

setAsText

public void setAsText(String text)
               throws 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 interface PropertyEditor
Overrides:
setAsText in class GenericArrayPropertyEditor<String[]>
Parameters:
text - The string to be parsed.
Throws:
IllegalArgumentException

tokenize

protected String[] tokenize(String text)
Overrides:
tokenize in class GenericArrayPropertyEditor<String[]>

encode

protected String encode(String[] v)
Overrides:
encode in class GenericArrayPropertyEditor<String[]>

JBoss Common Beans 1.1.0.Final-redhat-1

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.