|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.application.ConfigurationLoader
public final class ConfigurationLoader
This class searches for configuration file in several location in well defined order.
Method Summary | |
---|---|
static java.lang.ClassLoader |
findClassLoader(java.lang.Class c)
Tries to return class loader from provided class. |
static java.util.Properties |
loadConfiguration(java.lang.Class c,
java.lang.String name)
Loads the configuration from the file name .properties |
static java.util.Properties |
loadConfiguration(java.lang.String name)
Loads configuration from the file name .properties using
default class loader. |
static java.util.Properties |
loadConfigurationFile(java.lang.Class c,
java.lang.String propFileName)
Loads the configuration from the file with the given name using the supplied class's classloader. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.ClassLoader findClassLoader(java.lang.Class c)
null
is returned.
c
- class for witch class loader is searched
null
public static java.util.Properties loadConfiguration(java.lang.Class c, java.lang.String name)
name
.properties
c
- the class loader suppliername
- the name of the file (without extension)
public static java.util.Properties loadConfiguration(java.lang.String name)
name
.properties using
default class loader.
name
- the name of the file (without extension)
public static java.util.Properties loadConfigurationFile(java.lang.Class c, java.lang.String propFileName)
c
- class loader sourcepropFileName
- the name of the properties file (with extension)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |