23 in
#set ($x = 23), and for literal text in templates. In the template...
abc#{if}($x == 5)def#{end}xyz
...each of the strings abc, def, xyz is represented by an instance of
this class that evaluates to that string, and the value 5 is
represented by an instance of this class that evaluates to the integer 5.
| Modifier and Type | Field and Description |
|---|---|
| private static final CharMatcher | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object | evaluate(EvaluationContext
the context of the evaluation, for example the context, boolean $variables that are in
scopewhether an undefined plain reference like undefinedIsFalse)$foo is considered
to be false. This is the case when evaluating the condition in an #if. Everywhere
else, an undefined reference causes an exception.Implements abstract com. |
| pack-priv boolean | isHorizontalWhitespace()
Overrides com. |
| public String | toString()
Implements abstract com. |
| HORIZONTAL_SPACE | back to summary |
|---|---|
| private static final CharMatcher HORIZONTAL_SPACE | |
| value | back to summary |
|---|---|
| private final Object value | |
| ConstantExpressionNode | back to summary |
|---|---|
| pack-priv ConstantExpressionNode(String resourceName, int lineNumber, Object value) | |
| evaluate | back to summary |
|---|---|
| pack-priv Object evaluate(EvaluationContext context, boolean undefinedIsFalse) Implements abstract com. Doc from com. Returns the result of evaluating this node in the given context. This result may be used as
part of a further operation, for example evaluating This has to be an
| |
| isHorizontalWhitespace | back to summary |
|---|---|
| pack-priv boolean isHorizontalWhitespace() Overrides com. Doc from com. True if this node is just a span of horizontal whitespace in the text.
| |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract com. Doc from com. Returns the source form of this node. This may not be exactly how it appears in the template.
For example both This method is used in error messages. It is not invoked in normal template evaluation.
| |