Interface SpecialVariableProcessor

All Known Implementing Classes:
EnvironmentVariableProcessor, JCPSpecialVariableProcessor, MavenPropertiesImporter, PreprocessTask

public interface SpecialVariableProcessor
The interface describes a special variable processor which will be called for variables met by a preprocessor in expressions
  • Method Details

    • getVariableNames

      @MustNotContainNull String[] getVariableNames()
      Get all variable names allowed by the processor as an array, all names must be in lower case
      Returns:
      allowed variable names as a String array
    • getVariable

      Value getVariable(String varName, PreprocessorContext context)
      Get the value for the variable
      Parameters:
      varName - the variable name, must not be null
      context - the preprocessor context, it can be null
      Returns:
      the value, it must not return null because it will notified preprocessor that it supports the variable
    • setVariable

      void setVariable(String varName, Value value, PreprocessorContext context)
      Set a value to the variable
      Parameters:
      varName - the variable name, must not be null
      value - the value to be set to the variable, must not be null
      context - the preprocessor context, it can be null