abstract class Node
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
Node.Cons |
Modifier and Type | Field and Description |
---|---|
(package private) int |
lineNumber |
Constructor and Description |
---|
Node(int lineNumber) |
Modifier and Type | Method and Description |
---|---|
(package private) static Node |
cons(int lineNumber,
com.google.common.collect.ImmutableList<Node> nodes)
Create a new parse tree node that is the concatenation of the given ones.
|
(package private) static Node |
emptyNode(int lineNumber)
Returns an empty node in the parse tree.
|
(package private) abstract java.lang.Object |
evaluate(EvaluationContext context)
Returns the result of evaluating this node in the given context.
|
(package private) EvaluationException |
evaluationException(java.lang.String message) |
(package private) EvaluationException |
evaluationException(java.lang.Throwable cause) |
abstract java.lang.Object evaluate(EvaluationContext context)
2 + 3
to 5 in order to set
$x
to 5 in #set ($x = 2 + 3)
. Or it may be used directly as part of the
template output, for example evaluating replacing name
by Fred
in
My name is $name.
.EvaluationException evaluationException(java.lang.String message)
EvaluationException evaluationException(java.lang.Throwable cause)
static Node emptyNode(int lineNumber)
#if
that does not have an explicit #else
.