public class PropertyManager
extends java.lang.Object
The PropertyManager class represents a persistent set of
properties loaded from a standard Property file.
The location of the property file loaded by the PropertyManager
class is defined by the PropertyManager.file JVM environment
variable. For example, to initialize the PropertyManager
with a file located at c:\project\props.properties:
java -DPropertyManager.file=c:\project\props.properties junit.textui.TestRunner AllTests
propname=propvalue
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getProperty(java.lang.String key)
Searches for the property with the specified key in this property list.
|
static java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Searches for the property with the specified key in this property list.
|
static java.lang.Object |
setProperty(java.lang.String key,
java.lang.String value)
Maps the specified key to the specified value in this property list.
|
public static java.lang.Object setProperty(java.lang.String key,
java.lang.String value)
throws java.lang.NullPointerException
key - the hashtable key.value - a value.java.lang.NullPointerExceptionpublic static java.lang.String getProperty(java.lang.String key)
null if the property is not found.key - the hashtable key.getProperty(String, String)public static java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
key - the hashtable key.defaultValue - a default value.Copyright © ${project.year} ${project.holder}. All Rights Reserved.