public final class OriginTrackedMapPropertySource extends MapPropertySource implements OriginLookup<String>
OriginTrackedValue
PropertySource.StubPropertySource
logger, name, source
Constructor and Description |
---|
OriginTrackedMapPropertySource(String name,
Map source)
Create a new
OriginTrackedMapPropertySource instance. |
OriginTrackedMapPropertySource(String name,
Map source,
boolean immutable)
Create a new
OriginTrackedMapPropertySource instance. |
Modifier and Type | Method and Description |
---|---|
Origin |
getOrigin(String name)
Return the origin of the given key or
null if the origin cannot be
determined. |
Object |
getProperty(String name) |
boolean |
isImmutable()
Return
true if this lookup is immutable and has contents that will never
change. |
containsProperty, getPropertyNames
equals, getName, getSource, hashCode, named, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getOrigin
public OriginTrackedMapPropertySource(String name, Map source)
OriginTrackedMapPropertySource
instance.name
- the property source namesource
- the underlying map sourcepublic OriginTrackedMapPropertySource(String name, Map source, boolean immutable)
OriginTrackedMapPropertySource
instance.name
- the property source namesource
- the underlying map sourceimmutable
- if the underlying source is immutable and guaranteed not to changepublic Object getProperty(String name)
getProperty
in class MapPropertySource
public Origin getOrigin(String name)
OriginLookup
null
if the origin cannot be
determined.getOrigin
in interface OriginLookup<String>
name
- the key to lookupnull
public boolean isImmutable()
OriginLookup
true
if this lookup is immutable and has contents that will never
change.isImmutable
in interface OriginLookup<String>