Package org.springframework.boot.env
Class OriginTrackedMapPropertySource
java.lang.Object
org.springframework.core.env.PropertySource<T>
org.springframework.core.env.EnumerablePropertySource<Map<String,Object>>
org.springframework.core.env.MapPropertySource
org.springframework.boot.env.OriginTrackedMapPropertySource
- All Implemented Interfaces:
OriginLookup<String>
public final class OriginTrackedMapPropertySource
extends MapPropertySource
implements OriginLookup<String>
- Since:
- 2.0.0
- Author:
- Madhura Bhave, Phillip Webb
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.env.PropertySource
PropertySource.StubPropertySource -
Field Summary
Fields inherited from class org.springframework.core.env.PropertySource
logger, name, source -
Constructor Summary
ConstructorsConstructorDescriptionOriginTrackedMapPropertySource(String name, Map source) Create a newOriginTrackedMapPropertySourceinstance.OriginTrackedMapPropertySource(String name, Map source, boolean immutable) Create a newOriginTrackedMapPropertySourceinstance. -
Method Summary
Modifier and TypeMethodDescriptionReturn the origin of the given key ornullif the origin cannot be determined.getProperty(String name) booleanReturntrueif this lookup is immutable and has contents that will never change.Methods inherited from class org.springframework.core.env.MapPropertySource
containsProperty, getPropertyNamesMethods inherited from class org.springframework.core.env.PropertySource
equals, getName, getSource, hashCode, named, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.boot.origin.OriginLookup
getPrefix
-
Constructor Details
-
OriginTrackedMapPropertySource
Create a newOriginTrackedMapPropertySourceinstance.- Parameters:
name- the property source namesource- the underlying map source
-
OriginTrackedMapPropertySource
Create a newOriginTrackedMapPropertySourceinstance.- 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:
getPropertyin classMapPropertySource
-
getOrigin
Description copied from interface:OriginLookupReturn the origin of the given key ornullif the origin cannot be determined.- Specified by:
getOriginin interfaceOriginLookup<String>- Parameters:
name- the key to lookup- Returns:
- the origin of the key or
null
-
isImmutable
public boolean isImmutable()Description copied from interface:OriginLookupReturntrueif this lookup is immutable and has contents that will never change.- Specified by:
isImmutablein interfaceOriginLookup<String>- Returns:
- if the lookup is immutable
-