public class JCPSpecialVariableProcessor extends Object implements SpecialVariableProcessor
Modifier and Type | Class and Description |
---|---|
static class |
JCPSpecialVariableProcessor.NameReferencePair |
Modifier and Type | Field and Description |
---|---|
static String |
VAR_DATE |
static String |
VAR_DEST_DIR |
static String |
VAR_DEST_FILE_NAME |
static String |
VAR_DEST_FULLPATH |
static String |
VAR_LINE |
static String |
VAR_SRC_DIR |
static String |
VAR_SRC_DIR2 |
static String |
VAR_SRC_FILE_NAME |
static String |
VAR_SRC_FILE_NAME2 |
static String |
VAR_SRC_FULLPATH |
static String |
VAR_SRC_FULLPATH2 |
static String |
VAR_TIME |
static String |
VAR_TIMESTAMP |
static String |
VAR_VERSION |
Constructor and Description |
---|
JCPSpecialVariableProcessor() |
Modifier and Type | Method and Description |
---|---|
static List<JCPSpecialVariableProcessor.NameReferencePair> |
getReference() |
Value |
getVariable(String varName,
PreprocessorContext context)
Get the value for the variable
|
String[] |
getVariableNames()
Get all variable names allowed by the processor as an array, all names must
be in lower case
|
void |
setVariable(String varName,
Value value,
PreprocessorContext context)
Set a value to the variable
|
public static final String VAR_DEST_DIR
public static final String VAR_VERSION
public static final String VAR_DEST_FILE_NAME
public static final String VAR_DEST_FULLPATH
public static final String VAR_SRC_FILE_NAME
public static final String VAR_SRC_FILE_NAME2
public static final String VAR_SRC_DIR
public static final String VAR_SRC_DIR2
public static final String VAR_SRC_FULLPATH
public static final String VAR_SRC_FULLPATH2
public static final String VAR_LINE
public static final String VAR_DATE
public static final String VAR_TIME
public static final String VAR_TIMESTAMP
@MustNotContainNull public static List<JCPSpecialVariableProcessor.NameReferencePair> getReference()
@MustNotContainNull public String[] getVariableNames()
SpecialVariableProcessor
getVariableNames
in interface SpecialVariableProcessor
public Value getVariable(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(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 nullCopyright © 2011–2020 Igor Maznitsa. All rights reserved.