Class PropertiesEditor
- java.lang.Object
- java.beans.PropertyEditorSupport
- org.springframework.beans.propertyeditors.PropertiesEditor
- All Implemented Interfaces:
PropertyEditor
public class PropertiesEditor extends PropertyEditorSupport
CustomPropertyEditorforPropertiesobjects.Handles conversion from content
StringtoPropertiesobject. Also handlesMaptoPropertiesconversion, for populating aPropertiesobject via XML "map" entries.The required format is defined in the standard
Propertiesdocumentation. Each property must be on a new line.- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
Properties.load(java.io.Reader)
Constructor Summary
Constructors Constructor Description PropertiesEditor()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetAsText(String text)ConvertStringintoProperties, considering it as properties content.voidsetValue(Object value)Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
Constructor Detail
PropertiesEditor
public PropertiesEditor()
Method Detail
setAsText
public void setAsText(String text) throws IllegalArgumentException
ConvertStringintoProperties, considering it as properties content.- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport- Parameters:
text- the text to be so converted- Throws:
IllegalArgumentException
setValue
public void setValue(Object value)
- Specified by:
setValuein interfacePropertyEditor- Overrides:
setValuein classPropertyEditorSupport