public interface ExpressionNode extends Node
Tree| Modifier and Type | Method and Description |
|---|---|
MethodInfo |
getMethodInfo(Bindings bindings,
ELContext context,
Class<?> returnType,
Class<?>[] paramTypes)
Get method information.
|
String |
getStructuralId(Bindings bindings)
Get the canonical expression string for this node.
|
Class<?> |
getType(Bindings bindings,
ELContext context)
Get the value type accepted in
setValue(Bindings, ELContext, Object). |
Object |
getValue(Bindings bindings,
ELContext context,
Class<?> expectedType)
Evaluate node.
|
ValueReference |
getValueReference(Bindings bindings,
ELContext context)
Get value reference.
|
Object |
invoke(Bindings bindings,
ELContext context,
Class<?> returnType,
Class<?>[] paramTypes,
Object[] paramValues)
Invoke method.
|
boolean |
isLeftValue() |
boolean |
isLiteralText() |
boolean |
isMethodInvocation() |
boolean |
isReadOnly(Bindings bindings,
ELContext context)
Determine whether
setValue(Bindings, ELContext, Object) will throw a
PropertyNotWritableException. |
void |
setValue(Bindings bindings,
ELContext context,
Object value)
Assign value.
|
getCardinality, getChildboolean isLiteralText()
true if this node represents literal textboolean isLeftValue()
true if the subtree rooted at this node could be used as an lvalue
expression (identifier or property sequence with non-literal prefix).boolean isMethodInvocation()
true if the subtree rooted at this node is a method invocation.Object getValue(Bindings bindings, ELContext context, Class<?> expectedType)
bindings - bindings containing variables and functionscontext - evaluation contextexpectedType - result typeValueReference getValueReference(Bindings bindings, ELContext context)
bindings - context - Class<?> getType(Bindings bindings, ELContext context)
setValue(Bindings, ELContext, Object).bindings - bindings containing variables and functionscontext - evaluation contextnull for non-lvalue nodesboolean isReadOnly(Bindings bindings, ELContext context)
setValue(Bindings, ELContext, Object) will throw a
PropertyNotWritableException.bindings - bindings containing variables and functionscontext - evaluation contexttrue if this a read-only expression nodevoid setValue(Bindings bindings, ELContext context, Object value)
bindings - bindings containing variables and functionscontext - evaluation contextvalue - value to setMethodInfo getMethodInfo(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes)
null.bindings - bindings containing variables and functionscontext - evaluation contextreturnType - expected method return type (may be null meaning don't care)paramTypes - expected method argument typesnullObject invoke(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes, Object[] paramValues)
bindings - bindings containing variables and functionscontext - evaluation contextreturnType - expected method return type (may be null meaning don't care)paramTypes - expected method argument typesparamValues - parameter valuesString getStructuralId(Bindings bindings)
"${foo:bar()+2*foobar}" may lead to
"${<fn>() + 2 * <var>}" if foobar is a bound variable.
Otherwise, the structural id would be "${<fn>() + 2 * foobar}".
If the bindings is null, the full canonical subexpression is returned.Copyright © 2022. All rights reserved.