public class MavenPropertiesImporter extends java.lang.Object implements SpecialVariableProcessor
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,Value> |
insideVarMap |
private static java.util.regex.Pattern |
PATTERN_FOR_PROPERTY_WHICH_CAN_CONTAIN_PRIVATE_INFO |
private org.apache.maven.project.MavenProject |
project |
private static java.lang.String[] |
TO_IMPORT |
Constructor and Description |
---|
MavenPropertiesImporter(PreprocessorContext context,
org.apache.maven.project.MavenProject project) |
Modifier and Type | Method and Description |
---|---|
private void |
addVariableIntoInsideMap(PreprocessorContext context,
java.lang.String name,
Value value) |
(package private) static java.lang.String |
getProperty(org.apache.maven.project.MavenProject project,
java.lang.String name) |
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
|
(package private) static java.lang.String |
normalizeGetter(java.lang.String str) |
private void |
printInfoAboutVarIntoLog(PreprocessorContext context,
java.lang.String varName,
java.lang.String value) |
void |
setVariable(java.lang.String varName,
Value value,
PreprocessorContext context)
Set a value to the variable
|
private static final java.util.regex.Pattern PATTERN_FOR_PROPERTY_WHICH_CAN_CONTAIN_PRIVATE_INFO
private static final java.lang.String[] TO_IMPORT
private final java.util.Map<java.lang.String,Value> insideVarMap
private final org.apache.maven.project.MavenProject project
public MavenPropertiesImporter(PreprocessorContext context, org.apache.maven.project.MavenProject project)
private void printInfoAboutVarIntoLog(PreprocessorContext context, java.lang.String varName, java.lang.String value)
private void addVariableIntoInsideMap(PreprocessorContext context, java.lang.String name, Value value)
static java.lang.String getProperty(org.apache.maven.project.MavenProject project, java.lang.String name)
static java.lang.String normalizeGetter(java.lang.String str)
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