public class EnvironmentVariableProcessor extends java.lang.Object implements SpecialVariableProcessor
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,Value> |
environmentVars |
private static java.lang.String |
PREFIX |
Constructor and Description |
---|
EnvironmentVariableProcessor() |
Modifier and Type | Method and Description |
---|---|
Value |
getVariable(java.lang.String varName,
PreprocessorContext context)
Get the value for the variable
|
java.lang.String[] |
getVariableNames()
Get all variable names allowed by the processor as an array, all names must
be in lower case
|
void |
setVariable(java.lang.String varName,
Value value,
PreprocessorContext context)
Set a value to the variable
|
private static final java.lang.String PREFIX
private final java.util.Map<java.lang.String,Value> environmentVars
public java.lang.String[] getVariableNames()
SpecialVariableProcessor
getVariableNames
in interface SpecialVariableProcessor
public Value getVariable(java.lang.String varName, PreprocessorContext context)
SpecialVariableProcessor
getVariable
in interface SpecialVariableProcessor
varName
- the variable name, must not be nullcontext
- the preprocessor context, it can be nullpublic void setVariable(java.lang.String varName, Value value, PreprocessorContext context)
SpecialVariableProcessor
setVariable
in interface SpecialVariableProcessor
varName
- the variable name, must not be nullvalue
- the value to be set to the variable, must not be nullcontext
- the preprocessor context, it can be null