Class ConstantExpressionNode
- java.lang.Object
-
- com.google.auto.value.processor.escapevelocity.Node
-
- com.google.auto.value.processor.escapevelocity.ExpressionNode
-
- com.google.auto.value.processor.escapevelocity.ConstantExpressionNode
-
class ConstantExpressionNode extends ExpressionNode
A node in the parse tree representing a constant value. Evaluating the node yields the constant value. Instances of this class are used both in expressions, like the23in#set ($x = 23), and for literal text in templates. In the template...
...each of the stringsabc#{if}($x == 5)def#{end}xyzabc,def,xyzis represented by an instance of this class that evaluates to that string, and the value5is represented by an instance of this class that evaluates to the integer 5.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.auto.value.processor.escapevelocity.ExpressionNode
ExpressionNode.BinaryExpressionNode, ExpressionNode.NotExpressionNode
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Objectvalue-
Fields inherited from class com.google.auto.value.processor.escapevelocity.Node
lineNumber, resourceName
-
-
Constructor Summary
Constructors Constructor Description ConstantExpressionNode(java.lang.String resourceName, int lineNumber, java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.Objectevaluate(EvaluationContext context)Returns the result of evaluating this node in the given context.-
Methods inherited from class com.google.auto.value.processor.escapevelocity.ExpressionNode
intValue, isDefinedAndTrue, isTrue
-
Methods inherited from class com.google.auto.value.processor.escapevelocity.Node
cons, emptyNode, evaluationException, evaluationException
-
-
-
-
Method Detail
-
evaluate
java.lang.Object evaluate(EvaluationContext context)
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..
-
-