Class OriginTrackedMapPropertySource
- All Implemented Interfaces:
PropertySourceInfo, OriginLookup<String>
public final class OriginTrackedMapPropertySource
extends org.springframework.core.env.MapPropertySource
implements PropertySourceInfo, 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
ConstructorsConstructorDescriptionOriginTrackedMapPropertySource(String name, Map source) Create a newOriginTrackedMapPropertySourceinstance.OriginTrackedMapPropertySource(String name, Map source, boolean immutable) Create a newOriginTrackedMapPropertySourceinstance. -
Method Summary
Modifier and TypeMethodDescription@Nullable OriginReturn the origin of the given key ornullif the origin cannot be determined.@Nullable ObjectgetProperty(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 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
-
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
-