Package org.springframework.boot.env
Class OriginTrackedMapPropertySource
- All Implemented Interfaces:
OriginLookup<String>
public final class OriginTrackedMapPropertySource
extends org.springframework.core.env.MapPropertySource
implements OriginLookup<String>
- Since:
- 2.0.0
- See Also:
-
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
-
Constructor Summary
ConstructorDescriptionOriginTrackedMapPropertySource
(String name, Map source) Create a newOriginTrackedMapPropertySource
instance.OriginTrackedMapPropertySource
(String name, Map source, boolean immutable) Create a newOriginTrackedMapPropertySource
instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn the origin of the given key ornull
if the origin cannot be determined.getProperty
(String name) boolean
Returntrue
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
Methods inherited from interface org.springframework.boot.origin.OriginLookup
getPrefix
-
Constructor Details
-
OriginTrackedMapPropertySource
Create a newOriginTrackedMapPropertySource
instance.- Parameters:
name
- the property source namesource
- the underlying map source
-
OriginTrackedMapPropertySource
Create a newOriginTrackedMapPropertySource
instance.- Parameters:
name
- the property source namesource
- the underlying map sourceimmutable
- if the underlying source is immutable and guaranteed not to change- Since:
- 2.2.0
-
-
Method Details
-
getProperty
- Overrides:
getProperty
in classorg.springframework.core.env.MapPropertySource
-
getOrigin
Description copied from interface:OriginLookup
Return the origin of the given key ornull
if the origin cannot be determined.- Specified by:
getOrigin
in interfaceOriginLookup<String>
- Parameters:
name
- the key to lookup- Returns:
- the origin of the key or
null
-
isImmutable
public boolean isImmutable()Description copied from interface:OriginLookup
Returntrue
if this lookup is immutable and has contents that will never change.- Specified by:
isImmutable
in interfaceOriginLookup<String>
- Returns:
- if the lookup is immutable
-