public class DefaultConfiguration extends Object implements org.apache.tamaya.Configuration
ConfigurationContext to evaluate the
chain of PropertySource and PropertyFilter
instance to evaluate the current Configuration.| Constructor and Description |
|---|
DefaultConfiguration(org.apache.tamaya.spi.ConfigurationContext configurationContext)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
convertValue(String key,
String value,
org.apache.tamaya.TypeLiteral<T> type) |
protected Map<String,String> |
evaluateUnfilteredMap() |
protected Map<String,String> |
evaluteRawValue(String key) |
String |
get(String key) |
<T> T |
get(String key,
Class<T> type)
Accesses the current String value for the given key and tries to convert it
using the
PropertyConverter instances provided by the current
ConfigurationContext. |
<T> T |
get(String key,
org.apache.tamaya.TypeLiteral<T> type)
Accesses the current String value for the given key and tries to convert it
using the
PropertyConverter instances provided by the current
ConfigurationContext. |
org.apache.tamaya.spi.ConfigurationContext |
getConfigurationContext()
Access the configuration's context.
|
org.apache.tamaya.spi.ConfigurationContext |
getContext() |
<T> T |
getOrDefault(String key,
Class<T> type,
T defaultValue) |
String |
getOrDefault(String key,
String defaultValue) |
<T> T |
getOrDefault(String key,
org.apache.tamaya.TypeLiteral<T> type,
T defaultValue) |
Map<String,String> |
getProperties()
Get the current properties, composed by the loaded
PropertySource and filtered
by registered PropertyFilter. |
<T> T |
query(org.apache.tamaya.ConfigQuery<T> query) |
org.apache.tamaya.Configuration |
with(org.apache.tamaya.ConfigOperator operator) |
public DefaultConfiguration(org.apache.tamaya.spi.ConfigurationContext configurationContext)
configurationContext - The configuration Context to be used.public String getOrDefault(String key, String defaultValue)
getOrDefault in interface org.apache.tamaya.Configurationpublic <T> T getOrDefault(String key, Class<T> type, T defaultValue)
getOrDefault in interface org.apache.tamaya.Configurationpublic Map<String,String> getProperties()
PropertySource and filtered
by registered PropertyFilter.getProperties in interface org.apache.tamaya.Configurationpublic <T> T get(String key, Class<T> type)
PropertyConverter instances provided by the current
ConfigurationContext.get in interface org.apache.tamaya.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.public <T> T get(String key, org.apache.tamaya.TypeLiteral<T> type)
PropertyConverter instances provided by the current
ConfigurationContext.get in interface org.apache.tamaya.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.protected <T> T convertValue(String key, String value, org.apache.tamaya.TypeLiteral<T> type)
public <T> T getOrDefault(String key, org.apache.tamaya.TypeLiteral<T> type, T defaultValue)
getOrDefault in interface org.apache.tamaya.Configurationpublic org.apache.tamaya.Configuration with(org.apache.tamaya.ConfigOperator operator)
with in interface org.apache.tamaya.Configurationpublic <T> T query(org.apache.tamaya.ConfigQuery<T> query)
query in interface org.apache.tamaya.Configurationpublic org.apache.tamaya.spi.ConfigurationContext getContext()
getContext in interface org.apache.tamaya.Configurationpublic org.apache.tamaya.spi.ConfigurationContext getConfigurationContext()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.