public class ConfigurationUtils extends Object
| Constructor and Description |
|---|
ConfigurationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
configure(IConfigurable configurable,
Configuration config)
Configure the object accordingly.
|
static String |
getParam(SubnodeConfiguration config,
String name)
Returns the config parameter with given value for attribute name.
|
static <T> T |
load(Class<T> clazz,
Configuration config,
boolean configure)
Loads an object from a configuration.
|
static Object |
load(Configuration config,
boolean configure)
Loads an object from a configuration.
|
static Object |
load(String className,
Configuration config,
boolean configure)
Loads an object from a configuration.
|
public static Object load(Configuration config, boolean configure)
IConfigurable.
The class will be taken from attribute [@class].config - the configuration to applyconfigure - whether the object shall be configured (if it is a IConfigurable).public static Object load(String className, Configuration config, boolean configure)
IConfigurable.className - the name of class to be instantiatedconfig - the configuration to applyconfigure - whether the object shall be configured (if it is a IConfigurable).public static <T> T load(Class<T> clazz, Configuration config, boolean configure)
IConfigurable.clazz - the class to be instantiatedconfig - the configuration to applyconfigure - whether the object shall be configured (if it is a IConfigurable).public static void configure(IConfigurable configurable, Configuration config) throws ConfigurationException
configurable - the object to be configuredconfig - the configuration to applyConfigurationException - when a problem occurspublic static String getParam(SubnodeConfiguration config, String name)
config - configname - name of paramCopyright © 2014. All rights reserved.