$,
such as $x or $x[$i].foo($j).
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | ReferenceNode.IndexReferenceNode
A node in the parse tree that is an indexing of a reference, like |
| pack-priv static class | ReferenceNode.MemberReferenceNode
A node in the parse tree that is a reference to a property of another reference, like
|
| pack-priv static class | ReferenceNode.MethodReferenceNode
A node in the parse tree representing a method reference, like |
| pack-priv static class | ReferenceNode.PlainReferenceNode
A node in the parse tree that is a plain reference such as |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object | evaluateLhs(ReferenceNode lhs, EvaluationContext context)
Evaluates the first part of a complex reference, for example |
| pack-priv EvaluationException | |
| pack-priv Object | invokeMethod(Method method, Object target, List<Object> argValues)
Invoke the given method on the given target with the given arguments. |
| pack-priv boolean | isSilent()
Overrides com. |
| silent | back to summary |
|---|---|
| pack-priv final boolean silent | |
| ReferenceNode | back to summary |
|---|---|
| pack-priv ReferenceNode(String resourceName, int lineNumber, boolean silent) | |
| evaluateLhs | back to summary |
|---|---|
| pack-priv Object evaluateLhs(ReferenceNode lhs, EvaluationContext context) Evaluates the first part of a complex reference, for example | |
| evaluationExceptionInThis | back to summary |
|---|---|
| pack-priv EvaluationException evaluationExceptionInThis(String message) | |
| invokeMethod | back to summary |
|---|---|
| pack-priv Object invokeMethod(Method method, Object target, List<Object> argValues) Invoke the given method on the given target with the given arguments. | |
| isSilent | back to summary |
|---|---|
| pack-priv boolean isSilent() Overrides com. Doc from com. True if a null value for this expression is silently translated to an empty string when substituted into template text. Otherwise it results in an exception.
| |
$x[0] or
$x.foo[$i]. Indexing is array indexing or calling the get method of a list
or a map.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ExpressionNode | |
| pack-priv final ReferenceNode |
| 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. |
| public String | toString()
Implements abstract com. |
| index | back to summary |
|---|---|
| pack-priv final ExpressionNode index | |
| lhs | back to summary |
|---|---|
| pack-priv final ReferenceNode lhs | |
| IndexReferenceNode | back to summary |
|---|---|
| pack-priv IndexReferenceNode(ReferenceNode lhs, ExpressionNode index, boolean silent) | |
| 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
| |
| 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.
| |
$x.foo or $x[$i].foo.
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean[] | |
| pack-priv final String | |
| pack-priv final ReferenceNode | |
| private static final String[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| 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. |
| public String | toString()
Implements abstract com. |
| CHANGE_CASE | back to summary |
|---|---|
| private static final boolean[] CHANGE_CASE | |
| id | back to summary |
|---|---|
| pack-priv final String id | |
| lhs | back to summary |
|---|---|
| pack-priv final ReferenceNode lhs | |
| PREFIXES | back to summary |
|---|---|
| private static final String[] PREFIXES | |
| MemberReferenceNode | back to summary |
|---|---|
| pack-priv MemberReferenceNode(ReferenceNode lhs, String id, boolean silent) | |
| changeInitialCase | back to summary |
|---|---|
| private static String changeInitialCase(String id) | |
| 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
| |
| 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.
| |
$list.size().
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final List | |
| pack-priv final String | |
| private static final int | |
| pack-priv final ReferenceNode | |
| private static final ImmutableList |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static boolean | compatibleArgs(Class<?>[] paramTypes, List<Object> argValues)
Determines if the given argument list is compatible with the given parameter types. |
| 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. |
| private Object | |
| private static boolean | |
| pack-priv static boolean | primitiveTypeIsAssignmentCompatible(Class<?> to, Class<?> from)
Returns true if |
| public String | toString()
Implements abstract com. |
| args | back to summary |
|---|---|
| pack-priv final List<ExpressionNode> args | |
| id | back to summary |
|---|---|
| pack-priv final String id | |
| INDEX_OF_INT | back to summary |
|---|---|
| private static final int INDEX_OF_INT | |
| lhs | back to summary |
|---|---|
| pack-priv final ReferenceNode lhs | |
| NUMERICAL_PRIMITIVES | back to summary |
|---|---|
| private static final ImmutableList<Class<?>> NUMERICAL_PRIMITIVES | |
| MethodReferenceNode | back to summary |
|---|---|
| pack-priv MethodReferenceNode(ReferenceNode lhs, String id, List<ExpressionNode> args, boolean silent) | |
| compatibleArgs | back to summary |
|---|---|
| pack-priv static boolean compatibleArgs(Class<?>[] paramTypes, List<Object> argValues) Determines if the given argument list is compatible with the given parameter types. This
includes an | |
| 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 Evaluating a method expression such as Currently we don't allow there to be more than one matching method. That is a difference
from Velocity, which blithely allows you to invoke The method to be invoked must be visible in a public class or interface that is either the
class of
| |
| evaluate | back to summary |
|---|---|
| private Object evaluate(EvaluationContext context, Object lhsValue, Class<?> targetClass) | |
| primitiveIsCompatible | back to summary |
|---|---|
| private static boolean primitiveIsCompatible(Class<?> primitive, Object value) | |
| primitiveTypeIsAssignmentCompatible | back to summary |
|---|---|
| pack-priv static boolean primitiveTypeIsAssignmentCompatible(Class<?> to, Class<?> from) Returns true if | |
| 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.
| |
$x. This node may appear
inside a more complex reference like $x.foo.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final String |
| 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. |
| public String | toString()
Implements abstract com. |
| id | back to summary |
|---|---|
| pack-priv final String id | |
| PlainReferenceNode | back to summary |
|---|---|
| pack-priv PlainReferenceNode(String resourceName, int lineNumber, String id, boolean silent) | |
| 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
| |
| 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.
| |