public abstract class Config<E extends ConfigKey> extends DestroyableBase
Base class for XxConfig
Destroyable.Util| Modifier and Type | Field and Description |
|---|---|
protected Map<ConfigKey,Object> |
data |
protected Map<String,Object> |
raw |
DASHED_LINE, DOUBLE_DASHED_LINE, HASH_SYMBOL_LINE, logger, STAR_LINE, TILD_LINE| Constructor and Description |
|---|
Config() |
Config(Map<String,?> configuration)
Construct a
AppConfig with a map. |
| Modifier and Type | Method and Description |
|---|---|
static String |
canonical(String key) |
<T> T |
get(ConfigKey key,
T def)
Return configuration by
configuration key |
<T> T |
get(String key)
Look up configuration by a
String |
<T> T |
getIgnoreCase(String key) |
Integer |
getInteger(ConfigKey key,
Integer def) |
<T> List<T> |
getList(AppConfigKey key,
Class<T> c)
Return a configuration value as list
|
protected abstract ConfigKey |
keyOf(String s) |
static boolean |
matches(String k1,
String k2) |
Map<String,Object> |
rawConfiguration() |
protected void |
releaseResources() |
void |
set(ConfigKey key,
Object val) |
Map<String,Object> |
subSet(String namespace) |
addSubResource, destroy, isDestroyed, reload, scopedebug, debug, error, error, fatal, fatal, info, info, isDebugEnabled, isTraceEnabled, printCenter, printCenterWithLead, printDashedLine, printDoubleDashedLine, printHashSimbolLine, println, printStarLine, printTildLine, trace, trace, warn, warnpublic Config(Map<String,?> configuration)
Construct a AppConfig with a map. The map is copied to the original map of the configuration instance
configuration - public Config()
protected void releaseResources()
releaseResources in class DestroyableBasepublic <T> T get(ConfigKey key, T def)
Return configuration by configuration key
T - key - public <T> List<T> getList(AppConfigKey key, Class<T> c)
Return a configuration value as list
T - key - c - public <T> T get(String key)
Look up configuration by a String key. If the String key can be converted into rythm configuration key, then it is converted and call to get(ConfigKey, Object) method. Otherwise the original configuration map is used to fetch the value from the string key
T - key - public <T> T getIgnoreCase(String key)
Copyright © 2014–2018 ActFramework. All rights reserved.