站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

StringArrayPropertyEditor (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.beans.propertyeditors
Class StringArrayPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.springframework.beans.propertyeditors.StringArrayPropertyEditor
All Implemented Interfaces:
PropertyEditor

public class StringArrayPropertyEditor
extends PropertyEditorSupport

Custom PropertyEditor for String[] arrays.

Strings must be in CSV format, with a 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)

Field Summary
static String DEFAULT_SEPARATOR
          Default separator for splitting a String: a comma (",")
 
Constructor Summary
StringArrayPropertyEditor()
          Creates a new instance of the StringArrayPropertyEditor with the DEFAULT_SEPARATOR.
StringArrayPropertyEditor(String separator)
          Creates a new instance of the StringArrayPropertyEditor with the given separator.
 
Method Summary
 String getAsText()
           
 void setAsText(String text)
           
 
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
 

Field Detail

DEFAULT_SEPARATOR

public static final String DEFAULT_SEPARATOR
Default separator for splitting a String: a comma (",")

See Also:
Constant Field Values
Constructor Detail

StringArrayPropertyEditor

public StringArrayPropertyEditor()
Creates a new instance of the StringArrayPropertyEditor with the DEFAULT_SEPARATOR.


StringArrayPropertyEditor

public StringArrayPropertyEditor(String separator)
Creates a new instance of the StringArrayPropertyEditor with the given separator.

Parameters:
separator - the separator to use for splitting a String
Method Detail

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

The Spring Framework

Copyright © 2002-2007 The Spring Framework.