public class CompositePropertyLoader extends java.lang.Object implements PropertyLoader
Modifier and Type | Field and Description |
---|---|
protected PropertyLoader[] |
propertyLoaders
Ordered array of property loader to look-up into.
|
Constructor and Description |
---|
CompositePropertyLoader(PropertyLoader[] propertyLoaders)
Instantiates and fills a composite property loader with various implementations.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getProperty(java.lang.String key)
Searches for the property with the specified key.
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Searches for the property with the specified key.
|
protected PropertyLoader[] propertyLoaders
public CompositePropertyLoader(PropertyLoader[] propertyLoaders)
propertyLoaders
- array of implementations of PropertyLoader.public java.lang.String getProperty(java.lang.String key)
PropertyLoader
getProperty
in interface PropertyLoader
key
- the property key.null
if the property is not found.public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
PropertyLoader
getProperty
in interface PropertyLoader
key
- the property key.defaultValue
- a default value.