|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ntnu.ecosim.basicfunctionality.Config
public class Config
This class is used to read the cofiguration file and put it into an accessible hashtable. To get a property, the Config.getInstance().getProperty("ecosim","property") method is used.
Method Summary | |
---|---|
static Config |
getInstance()
Method to get an instance of the configuration file |
java.lang.String |
getProperty(java.lang.String moduleName,
java.lang.String propertyName)
Method to get a property from the configuration. |
ConfigProperties |
getSubModule(java.lang.String moduleName,
java.lang.String subModuleName)
Gets the configuration properties of a sub module. |
void |
setConfigPath(java.lang.String path)
Sets the configuration file path. |
void |
setLastModified(long l)
Sets the time last modified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Config getInstance()
public java.lang.String getProperty(java.lang.String moduleName, java.lang.String propertyName) throws PropertyNotFoundException
propertyName
- Name of the required property, for instance "Log.LogLevel"moduleName
- Name of the module
PropertyNotFoundException
public ConfigProperties getSubModule(java.lang.String moduleName, java.lang.String subModuleName)
subModuleName
- the sub module namemoduleName
- the module name
public void setConfigPath(java.lang.String path)
path
- the file pathpublic void setLastModified(long l)
l
- the time last modified
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |