当前页面:
在线文档首页 >
Spring Framework 1.2.9 API 文档英文版
PropertiesEditor (Spring Framework) - Spring Framework 1.2.9 API 文档英文版
org.springframework.beans.propertyeditors
Class PropertiesEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.beans.propertyeditors.PropertiesEditor
- All Implemented Interfaces:
- PropertyEditor
public class PropertiesEditor
- extends PropertyEditorSupport
Editor for java.util.Properties
objects.
Handles conversion from String to Properties object.
Also handles Map to Properties conversion, for populating
a Properties object via XML "map" entries.
The required format is defined in java.util.Properties
documentation. Each property must be on a new line.
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
Properties.load(java.io.InputStream)
Field Summary |
static String |
COMMENT_MARKERS
Any of these characters, if they're first after whitespace or first
on a line, mean that the line is a comment and should be ignored. |
Method Summary |
void |
setAsText(String text)
Convert String into Properties. |
void |
setValue(Object value)
Take Properties as-is; convert java.util.Map into Properties. |
Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMMENT_MARKERS
public static final String COMMENT_MARKERS
- Any of these characters, if they're first after whitespace or first
on a line, mean that the line is a comment and should be ignored.
- See Also:
- Constant Field Values
PropertiesEditor
public PropertiesEditor()
setAsText
public void setAsText(String text)
throws IllegalArgumentException
- Convert String into Properties.
- Specified by:
setAsText
in interface PropertyEditor
- Overrides:
setAsText
in class PropertyEditorSupport
- Throws:
IllegalArgumentException
setValue
public void setValue(Object value)
- Take Properties as-is; convert
java.util.Map
into Properties.
- Specified by:
setValue
in interface PropertyEditor
- Overrides:
setValue
in class PropertyEditorSupport
Copyright (c) 2002-2007 The Spring Framework Project.