Class ManagedProperties
- java.lang.Object
- java.util.Dictionary<K,V>
- java.util.Hashtable<Object,Object>
- java.util.Properties
- org.springframework.beans.factory.support.ManagedProperties
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>,BeanMetadataElement,Mergeable
public class ManagedProperties extends Properties implements Mergeable, BeanMetadataElement
Tag class which represents a Spring-managedPropertiesinstance that supports merging of parent/child definitions.- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller
- See Also:
- Serialized Form
Field Summary
Fields inherited from class java.util.Properties
defaults
Constructor Summary
Constructors Constructor Description ManagedProperties()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetSource()Return the configuration sourceObjectfor this metadata element (may benull).booleanisMergeEnabled()Is merging enabled for this particular instance?Objectmerge(Object parent)Merge the current value set with that of the supplied object.voidsetMergeEnabled(boolean mergeEnabled)Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.voidsetSource(Object source)Set the configuration sourceObjectfor this metadata element.Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
Constructor Detail
ManagedProperties
public ManagedProperties()
Method Detail
setSource
public void setSource(@Nullable Object source)
Set the configuration sourceObjectfor this metadata element.The exact type of the object will depend on the configuration mechanism used.
getSource
@Nullable public Object getSource()
Description copied from interface:BeanMetadataElementReturn the configuration sourceObjectfor this metadata element (may benull).- Specified by:
getSourcein interfaceBeanMetadataElement
setMergeEnabled
public void setMergeEnabled(boolean mergeEnabled)
Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.
isMergeEnabled
public boolean isMergeEnabled()
Description copied from interface:MergeableIs merging enabled for this particular instance?- Specified by:
isMergeEnabledin interfaceMergeable