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-managed Properties instance that supports merging of parent/child definitions.
Since:
2.0
Author:
Rob Harrop, Juergen Hoeller
See Also:
  • Constructor Details

    • ManagedProperties

      public ManagedProperties()
  • Method Details

    • setSource

      public void setSource(@Nullable Object source)
      Set the configuration source Object for 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: BeanMetadataElement
      Return the configuration source Object for this metadata element (may be null).
      Specified by:
      getSource in interface BeanMetadataElement
    • 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: Mergeable
      Is merging enabled for this particular instance?
      Specified by:
      isMergeEnabled in interface Mergeable
    • merge

      public Object merge(@Nullable Object parent)
      Description copied from interface: Mergeable
      Merge the current value set with that of the supplied object.

      The supplied object is considered the parent, and values in the callee's value set must override those of the supplied object.

      Specified by:
      merge in interface Mergeable
      Parameters:
      parent - the object to merge with
      Returns:
      the result of the merge operation