org.springframework.beans.propertyeditors
Class StringArrayPropertyEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.beans.propertyeditors.StringArrayPropertyEditor
- All Implemented Interfaces:
- PropertyEditor
public class StringArrayPropertyEditor
- extends PropertyEditorSupport
Editor for String arrays. Strings must be in CSV format,
with customizable separator.
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
StringUtils.delimitedListToStringArray(java.lang.String, java.lang.String)
,
StringUtils.arrayToDelimitedString(java.lang.Object[], java.lang.String)
Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, 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 |
DEFAULT_SEPARATOR
public static final String DEFAULT_SEPARATOR
- Default separator for splitting a String: a comma (",")
- See Also:
- Constant Field Values
StringArrayPropertyEditor
public StringArrayPropertyEditor()
- Create a new StringArrayPropertyEditor with the default separator:
a comma (",")
StringArrayPropertyEditor
public StringArrayPropertyEditor(String separator)
- Create a new StringArrayPropertyEditor with the given separator.
- Parameters:
separator
- the separator to use for splitting a String
setAsText
public void setAsText(String text)
throws IllegalArgumentException
- Specified by:
setAsText
in interface PropertyEditor
- Overrides:
setAsText
in class PropertyEditorSupport
- Throws:
IllegalArgumentException
getAsText
public String getAsText()
- Specified by:
getAsText
in interface PropertyEditor
- Overrides:
getAsText
in class PropertyEditorSupport
Copyright (c) 2002-2007 The Spring Framework Project.