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

PropertiesEditor (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.beans.propertyeditors
Class PropertiesEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by 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.
 
Constructor Summary
PropertiesEditor()
           
 
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
 

Field Detail

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
Constructor Detail

PropertiesEditor

public PropertiesEditor()
Method Detail

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.