public class StandardPropertyManager extends java.lang.Object implements PropertyManager
PropertyManager
.SYSTEM_PROPERTY_SOURCE
Constructor and Description |
---|
StandardPropertyManager()
Default Constructor.
|
StandardPropertyManager(java.util.Properties properties,
java.lang.String source)
Constructor with some properties.
|
StandardPropertyManager(PropertyManager parent)
Constructor the defers first to a parent.
|
StandardPropertyManager(PropertyManager parent,
java.util.Properties properties,
java.lang.String source)
Constructor that defers first to parent, then to given properties.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyLookup(PropertyLookup propertyLookup)
Add a lookup.
|
void |
addPropertyOverride(PropertyLookup propertyLookup)
Add a property overrides.
|
java.lang.String |
lookup(java.lang.String propertyName)
Return the value of a property, or null if it doesn't exist.
|
java.util.Set<java.lang.String> |
propertyNames()
Return all property names in this property lookup.
|
void |
removePropertyLookup(PropertyLookup propertyLookup)
Remove a lookup.
|
PropertySource |
sourceFor(java.lang.String propertyName)
Return a source for the property.
|
public StandardPropertyManager()
public StandardPropertyManager(java.util.Properties properties, java.lang.String source)
properties
- source
- The name of the source of the properties.public StandardPropertyManager(PropertyManager parent)
parent
- public StandardPropertyManager(PropertyManager parent, java.util.Properties properties, java.lang.String source)
parent
- properties
- source
- The name of the source of the properties.public void addPropertyLookup(PropertyLookup propertyLookup)
PropertyManager
addPropertyLookup
in interface PropertyManager
public void addPropertyOverride(PropertyLookup propertyLookup)
PropertyManager
addPropertyOverride
in interface PropertyManager
public void removePropertyLookup(PropertyLookup propertyLookup)
PropertyManager
removePropertyLookup
in interface PropertyManager
public java.lang.String lookup(java.lang.String propertyName)
PropertyLookup
lookup
in interface PropertyLookup
propertyName
- The name of the property.public java.util.Set<java.lang.String> propertyNames()
PropertyLookup
propertyNames
in interface PropertyLookup
public PropertySource sourceFor(java.lang.String propertyName)
PropertyLookup
sourceFor
in interface PropertyLookup
propertyName
- The property name.