Class DirectiveNode.SetNode
java.lang.Object
com.google.auto.value.processor.escapevelocity.Node
com.google.auto.value.processor.escapevelocity.DirectiveNode
com.google.auto.value.processor.escapevelocity.DirectiveNode.SetNode
- Enclosing class:
DirectiveNode
A node in the parse tree representing a
#set construct. Evaluating
#set ($x = 23) will set $x to the value 23. It does not in itself produce
any text in the output.
Velocity supports setting values within arrays or collections, with for example
$set ($x[$i] = $y). That is not currently supported here.
-
Nested Class Summary
Nested classes/interfaces inherited from class DirectiveNode
DirectiveNode.ForEachNode, DirectiveNode.IfNode, DirectiveNode.MacroCallNode, DirectiveNode.SetNode -
Field Summary
FieldsFields inherited from class Node
lineNumber, resourceName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Objectevaluate(EvaluationContext context) Returns the result of evaluating this node in the given context.Methods inherited from class Node
cons, emptyNode, evaluationException, evaluationException
-
Field Details
-
var
-
expression
-
-
Constructor Details
-
SetNode
-
-
Method Details
-
evaluate
Description copied from class:NodeReturns the result of evaluating this node in the given context. This result may be used as part of a further operation, for example evaluating2 + 3to 5 in order to set$xto 5 in#set ($x = 2 + 3). Or it may be used directly as part of the template output, for example evaluating replacingnamebyFredinMy name is $name..
-