|
Jalopy 1.0b10 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.hunsicker.jalopy.storage.Environment
Provides access to global and local environment variables (key/value pairs).
This class is thread-safe.
| Inner Class Summary | |
static class |
Environment.Variable
Represents a local environment variable. |
| Method Summary | |
Environment |
copy()
Returns a copy of this object. |
static Environment |
getInstance()
Returns an instance of this class. |
String |
interpolate(String str)
Performs variable interpolation for the given input string. |
void |
set(String variable,
String value)
Sets the given variable to the given value. |
String |
toString()
Returns a string representation of this object. |
void |
unset(String variable)
Unsets (removes) the given variable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public static Environment getInstance()
public Environment copy()
public String interpolate(String str)
\$[a-zA-Z_][a-zA-Z0-9_.]+\$, e.g. $fileName$
or $author$) in the given string are replaced with their corresponding
environment value.str - string to perform variable interpolation for.set(java.lang.String, java.lang.String)
public void set(String variable,
String value)
variable - variable name. Valid variable names have the form
[a-zA-Z_][a-zA-Z0-9_.]+value - value to associate.unset(java.lang.String)public String toString()
toString in class Objectpublic void unset(String variable)
variable - variable name.set(java.lang.String, java.lang.String)
|
Jalopy 1.0b10 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||