Class EvaluationContext.PlainEvaluationContext

java.lang.Object
com.google.auto.value.processor.escapevelocity.EvaluationContext.PlainEvaluationContext
All Implemented Interfaces:
EvaluationContext
Enclosing interface:
EvaluationContext

public static class EvaluationContext.PlainEvaluationContext extends Object implements EvaluationContext
  • Field Details

  • Constructor Details

    • PlainEvaluationContext

      PlainEvaluationContext(Map<String,?> vars)
  • Method Details

    • getVar

      public Object getVar(String var)
      Specified by:
      getVar in interface EvaluationContext
    • varIsDefined

      public boolean varIsDefined(String var)
      Specified by:
      varIsDefined in interface EvaluationContext
    • setVar

      public Runnable setVar(String var, Object value)
      Description copied from interface: EvaluationContext
      Sets the given variable to the given value.
      Specified by:
      setVar in interface EvaluationContext
      Returns:
      a Runnable that will restore the variable to the value it had before. If the variable was undefined before this method was executed, the Runnable will make it undefined again. This allows us to restore the state of $x after #foreach ($x in ...).