Top Description Constructors Methods
org.springframework.beans.propertyeditors

public Class PropertiesEditor

extends PropertyEditorSupport
Class Inheritance
Imports
java.beans.PropertyEditorSupport, java.io.ByteArrayInputStream, .IOException, java.nio.charset.StandardCharsets, java.util.Map, .Properties, org.springframework.lang.Nullable

Custom java.beans.PropertyEditor for Properties objects.

Handles conversion from content 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 the standard Properties documentation. Each property must be on a new line.

Authors
Rod Johnson, Juergen Hoeller
See Also
java.util.Properties#load

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
setAsText(String
the text to be so converted
text
)

Overrides java.beans.PropertyEditorSupport.setAsText.

Implements java.beans.PropertyEditor.setAsText.

Convert String into Properties, considering it as properties content.

public void
setValue(Object
The new target object to be edited. Note that this object should not be modified by the PropertyEditor, rather the PropertyEditor should create a new object to hold any modified value.
value
)

Overrides java.beans.PropertyEditorSupport.setValue.

Implements java.beans.PropertyEditor.setValue.

Take Properties as-is; convert Map into Properties.

Inherited from java.beans.PropertyEditorSupport:
addPropertyChangeListenerfirePropertyChangegetAsTextgetCustomEditorgetJavaInitializationStringgetSourcegetTagsgetValueisPaintablepaintValueremovePropertyChangeListenersetSourcesupportsCustomEditor

Constructor Detail

PropertiesEditorback to summary
public PropertiesEditor()

Method Detail

setAsTextback to summary
public void setAsText(String text) throws IllegalArgumentException

Overrides java.beans.PropertyEditorSupport.setAsText.

Implements java.beans.PropertyEditor.setAsText.

Convert String into Properties, considering it as properties content.

Parameters
text:String

the text to be so converted

Annotations
@Override
setValueback to summary
public void setValue(Object value)

Overrides java.beans.PropertyEditorSupport.setValue.

Implements java.beans.PropertyEditor.setValue.

Take Properties as-is; convert Map into Properties.

Parameters
value:Object

Doc from java.beans.PropertyEditorSupport.setValue.

The new target object to be edited. Note that this object should not be modified by the PropertyEditor, rather the PropertyEditor should create a new object to hold any modified value.

Annotations
@Override