|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.extensions.conf.ConfigurationFactory
Factory for creating configurations.
Field Summary | |
protected LoadableConfiguration |
conf
Configuration created by factory. |
static java.lang.String[] |
DEFAULT_PATH_LIST
Defaults for finding the configuration files |
static java.lang.String |
EXTENSION
Extension of configuration files. |
protected static ConfigurationFactory |
factory
The only instance of configuration factory. |
static java.lang.String |
HINT
Property key that defines configuration file or path to configuration files. |
static java.lang.String |
LOADER
Property key that defines loadable configuration implementation class name. |
Method Summary | |
Configuration |
getConfiguration()
Returns current configuration. |
protected LoadableConfiguration |
getConfiguration(java.lang.String[] path,
java.lang.String fileName)
Factory method for instantiating and populating configuration. |
static ConfigurationFactory |
getFactory()
Returns factory instance. |
protected java.lang.String |
getFileName(java.lang.Class base)
Generates configuration file name based on class name. |
static void |
init(java.lang.Class base)
Explicit initialization of factory. |
protected void |
load(java.lang.Class base)
Loads configuration into factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String[] DEFAULT_PATH_LIST
public static final java.lang.String LOADER
public static final java.lang.String HINT
public static final java.lang.String EXTENSION
protected static ConfigurationFactory factory
protected LoadableConfiguration conf
Method Detail |
public static ConfigurationFactory getFactory()
public Configuration getConfiguration()
public static void init(java.lang.Class base)
base
- Class that is used as base to find configuration.protected void load(java.lang.Class base) throws java.io.IOException
base
- Class that is used as base to find configuration.protected java.lang.String getFileName(java.lang.Class base)
base
- Reference class.protected LoadableConfiguration getConfiguration(java.lang.String[] path, java.lang.String fileName) throws java.io.IOException
path
- Search path for configuration files.fileName
- Name of configuration file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |