org.springframework.beans.factory.support

Class ManagedProperties

  • java.lang.Object
    • java.util.Dictionary<K,V>
      • java.util.Hashtable<java.lang.Object,java.lang.Object>
        • java.util.Properties
          • org.springframework.beans.factory.support.ManagedProperties
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>, BeanMetadataElement, Mergeable


    public class ManagedProperties
    extends java.util.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:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.Properties

        defaults
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object getSource()
      Return the configuration source Object for this metadata element (may be null).
      boolean isMergeEnabled()
      Is merging enabled for this particular instance?
      java.lang.Object merge(java.lang.Object parent)
      Merge the current value set with that of the supplied object.
      void setMergeEnabled(boolean mergeEnabled)
      Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.
      void setSource(java.lang.Object source)
      Set the configuration source Object for this metadata element.
      • Methods inherited from class java.util.Properties

        getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
      • Methods inherited from class java.util.Hashtable

        clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ManagedProperties

        public ManagedProperties()
    • Method Detail

      • setSource

        public void setSource(@Nullable
                              java.lang.Object source)
        Set the configuration source Object for this metadata element.

        The exact type of the object will depend on the configuration mechanism used.

      • 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 java.lang.Object merge(@Nullable
                                      java.lang.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