org.springframework.boot.env

Class OriginTrackedMapPropertySource

  • java.lang.Object
    • org.springframework.core.env.PropertySource<T>
      • org.springframework.core.env.EnumerablePropertySource<java.util.Map<java.lang.String,java.lang.Object>>
        • org.springframework.core.env.MapPropertySource
          • org.springframework.boot.env.OriginTrackedMapPropertySource
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.core.env.PropertySource

        org.springframework.core.env.PropertySource.StubPropertySource
    • Field Summary

      • Fields inherited from class org.springframework.core.env.PropertySource

        logger, name, source
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Origin getOrigin(java.lang.String name)
      Return the origin of the given key or null if the origin cannot be determined.
      java.lang.Object getProperty(java.lang.String name) 
      boolean isImmutable()
      Return true if this lookup is immutable and has contents that will never change.
      • Methods inherited from class org.springframework.core.env.MapPropertySource

        containsProperty, getPropertyNames
      • Methods inherited from class org.springframework.core.env.PropertySource

        equals, getName, getSource, hashCode, named, toString
      • Methods inherited from class java.lang.Object

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

      • OriginTrackedMapPropertySource

        public OriginTrackedMapPropertySource(java.lang.String name,
                                              java.util.Map source)
        Create a new OriginTrackedMapPropertySource instance.
        Parameters:
        name - the property source name
        source - the underlying map source
      • OriginTrackedMapPropertySource

        public OriginTrackedMapPropertySource(java.lang.String name,
                                              java.util.Map source,
                                              boolean immutable)
        Create a new OriginTrackedMapPropertySource instance.
        Parameters:
        name - the property source name
        source - the underlying map source
        immutable - if the underlying source is immutable and guaranteed not to change
        Since:
        2.2.0
    • Method Detail

      • getProperty

        public java.lang.Object getProperty(java.lang.String name)
        Overrides:
        getProperty in class org.springframework.core.env.MapPropertySource
      • getOrigin

        public Origin getOrigin(java.lang.String name)
        Description copied from interface: OriginLookup
        Return the origin of the given key or null if the origin cannot be determined.
        Specified by:
        getOrigin in interface OriginLookup<java.lang.String>
        Parameters:
        name - the key to lookup
        Returns:
        the origin of the key or null
      • isImmutable

        public boolean isImmutable()
        Description copied from interface: OriginLookup
        Return true if this lookup is immutable and has contents that will never change.
        Specified by:
        isImmutable in interface OriginLookup<java.lang.String>
        Returns:
        if the lookup is immutable