public class Config extends Object
Constructor and Description |
---|
Config()
Constructs a new configuration object.
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
get(String name,
T defaultvalue)
Looks up the current configuration for the given name, with a default value.
|
Map<String,Object> |
getProperties()
Returns the property map.
|
Object |
getProperty(String name)
Returns the configuration property value for the given name.
|
void |
loadProperties()
Adds properties from the resource
jwig.properties , obtained from the class loader. |
void |
setParent(Config parent)
Sets the parent configuration.
|
void |
setProperty(String name,
Object value)
Sets a configuration property.
|
public static <T> T get(String name, T defaultvalue)
ClassCastException
- if the actual type cannot be converted to the type of the default valuepublic Object getProperty(String name)
public void loadProperties() throws JWIGException
jwig.properties
, obtained from the class loader.JWIGException
- if an error occurred when reading from the input streampublic void setParent(Config parent)
Copyright © 2008-2012 Anders Møller & Mathias Schwarz.