public final class Environment
extends java.lang.Object
This class is thread-safe.
Modifier and Type | Class and Description |
---|---|
static class |
Environment.Variable
Represents a local environment variable.
|
Modifier and Type | Method and Description |
---|---|
Environment |
copy()
Returns a copy of this object.
|
static Environment |
getInstance()
Returns an instance of this class.
|
java.lang.String |
interpolate(java.lang.String str)
Performs variable interpolation for the given input string.
|
void |
set(java.lang.String variable,
java.lang.String value)
Sets the given variable to the given value.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
void |
unset(java.lang.String variable)
Unsets (removes) the given variable
|
public static Environment getInstance()
public Environment copy()
public java.lang.String interpolate(java.lang.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(java.lang.String variable, java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
public void unset(java.lang.String variable)
variable
- variable name.set(java.lang.String, java.lang.String)
Submit a bug or feature.
For further information and documentation, visit the official Jalopy website.
This page generated: March 30 2013