Class OriginTrackedMapPropertySource
java.lang.Object
org.springframework.core.env.PropertySource<Map<String,Object>>
org.springframework.core.env.EnumerablePropertySource<Map<String,Object>>
org.springframework.core.env.MapPropertySource
org.springframework.boot.env.OriginTrackedMapPropertySource
- All Implemented Interfaces:
PropertySourceInfo, OriginLookup<String>
public final class OriginTrackedMapPropertySource
extends MapPropertySource
implements PropertySourceInfo, OriginLookup<String>
- Since:
- 2.0.0
- Author:
- Madhura Bhave, Phillip Webb
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class PropertySource
PropertySource.StubPropertySource -
Field Summary
Fields inherited from class 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 MapPropertySource
containsProperty, getPropertyNamesMethods inherited from interface PropertySourceInfo
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:PropertySourceInfoReturntrueif this lookup is immutable and has contents that will never change.- Specified by:
isImmutablein interfacePropertySourceInfo- Returns:
- if the lookup is immutable
-