junit.extensions.conf
Class FileConfiguration
java.lang.Object
|
+--junit.extensions.conf.FileConfiguration
- All Implemented Interfaces:
- Configuration, LoadableConfiguration
- public class FileConfiguration
- extends java.lang.Object
- implements LoadableConfiguration
Implementation of LoadableConfiguration that uses properties files.
Note, that class is not thread safe since it is intended to be
immutable after creation.
- Author:
- Siegfried GOESCHL, Dima STADNIK
Field Summary |
static java.lang.String |
INCLUDE
Property key for includes. |
Method Summary |
boolean |
getBoolean(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
byte |
getByte(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
char |
getChar(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
double |
getDouble(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
float |
getFloat(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
int |
getInteger(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
long |
getLong(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
short |
getShort(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
java.lang.String |
getString(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
java.lang.String[] |
getStrings(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
|
void |
load(java.lang.String[] path,
java.lang.String fileName)
Loads configuration from file(s). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INCLUDE
public static final java.lang.String INCLUDE
- Property key for includes.
FileConfiguration
public FileConfiguration()
- Default constructor.
FileConfiguration
public FileConfiguration(java.lang.String fileName)
throws java.io.IOException
- Preloads configuration from file.
- Parameters:
fileName
- Name of properties file.
FileConfiguration
public FileConfiguration(java.lang.String[] path,
java.lang.String fileName)
throws java.io.IOException
- Preloads configuration from file.
- Parameters:
fileName
- Name of properties file.path
- Properties file search path.
load
public void load(java.lang.String[] path,
java.lang.String fileName)
throws java.io.IOException
- Loads configuration from file(s).
- Specified by:
load
in interface LoadableConfiguration
- Parameters:
fileName
- Name of properties file.path
- Properties file search path.
getBoolean
public boolean getBoolean(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getBoolean
in interface Configuration
getByte
public byte getByte(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getByte
in interface Configuration
getChar
public char getChar(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getChar
in interface Configuration
getDouble
public double getDouble(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getDouble
in interface Configuration
getFloat
public float getFloat(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getFloat
in interface Configuration
getInteger
public int getInteger(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getInteger
in interface Configuration
getLong
public long getLong(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getLong
in interface Configuration
getShort
public short getShort(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getShort
in interface Configuration
getString
public java.lang.String getString(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getString
in interface Configuration
getStrings
public java.lang.String[] getStrings(java.lang.Object base,
java.lang.String modifier,
java.lang.String key)
- Specified by:
getStrings
in interface Configuration
Copyright © 2001-2002 IT20one GmbH. All Rights Reserved.