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 java.lang.Object implements EvaluationContext
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.auto.value.processor.escapevelocity.EvaluationContext
EvaluationContext.PlainEvaluationContext
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.Object>
vars
-
Constructor Summary
Constructors Constructor Description PlainEvaluationContext(java.util.Map<java.lang.String,?> vars)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getVar(java.lang.String var)
java.lang.Runnable
setVar(java.lang.String var, java.lang.Object value)
Sets the given variable to the given value.boolean
varIsDefined(java.lang.String var)
-
-
-
Method Detail
-
getVar
public java.lang.Object getVar(java.lang.String var)
- Specified by:
getVar
in interfaceEvaluationContext
-
varIsDefined
public boolean varIsDefined(java.lang.String var)
- Specified by:
varIsDefined
in interfaceEvaluationContext
-
setVar
public java.lang.Runnable setVar(java.lang.String var, java.lang.Object value)
Description copied from interface:EvaluationContext
Sets the given variable to the given value.- Specified by:
setVar
in interfaceEvaluationContext
- 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 ...)
.
-
-