public class DefaultConfiguration extends Object implements Configuration
ConfigurationContext to evaluate the
chain of PropertySource and PropertyFilter
instance to evaluate the current Configuration.| Constructor and Description |
|---|
DefaultConfiguration(ConfigurationContext configurationContext)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
get(String key)
This method evaluates the given configuration key.
|
<T> T |
get(String key,
TypeLiteral<T> type)
Accesses the current String value for the given key (see
Configuration.getOptional(String)) and tries to convert it
using the PropertyConverter instances provided by the current
ConfigurationContext. |
Map<String,String> |
getProperties()
Get the current properties, composed by the loaded
PropertySource and filtered
by registered PropertyFilter. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, getBoolean, getDouble, getInteger, getLong, getOptional, getOptional, getOptional, query, withpublic DefaultConfiguration(ConfigurationContext configurationContext)
configurationContext - The configuration Context to be used.public String get(String key)
ConfigurationContext. The first non-null-value returned
is taken as an intermediate value. Finally the value is filtered through the
PropertyFilter instances installed, before it is returned as the final result of
this method.get in interface Configurationkey - the property's key, not null.public Map<String,String> getProperties()
PropertySource and filtered
by registered PropertyFilter.getProperties in interface Configurationpublic <T> T get(String key, TypeLiteral<T> type)
Configuration.getOptional(String)) and tries to convert it
using the PropertyConverter instances provided by the current
ConfigurationContext.get in interface ConfigurationT - the value typekey - the property's absolute, or relative path, e.g. @code
a/b/c/d.myProperty}.type - The target type required, not null.Copyright © 2014–2015 Apache Software Foundation. All rights reserved.