public final class TreeMethodExpression
extends javax.el.MethodExpression
invoke(ELContext, Object[])
or getMethodInfo(ELContext)
).
Instances of this class are usually created using an ExpressionFactoryImpl
.Constructor and Description |
---|
TreeMethodExpression(TreeStore store,
javax.el.FunctionMapper functions,
javax.el.VariableMapper variables,
TypeConverter converter,
String expr,
Class<?> returnType,
Class<?>[] paramTypes)
Create a new method expression.
|
Modifier and Type | Method and Description |
---|---|
void |
dump(PrintWriter writer)
Print the parse tree.
|
boolean |
equals(Object obj)
Expressions are compared using the concept of a structural id:
variable and function names are anonymized such that two expressions with
same tree structure will also have the same structural id and vice versa.
|
String |
getExpressionString() |
javax.el.MethodInfo |
getMethodInfo(javax.el.ELContext context)
Evaluates the expression and answers information about the method
|
int |
hashCode() |
Object |
invoke(javax.el.ELContext context,
Object[] paramValues)
Evaluates the expression and invokes the method.
|
boolean |
isDeferred()
Answer
true if this is a deferred expression (starting with #{ ) |
boolean |
isLiteralText() |
boolean |
isParmetersProvided() |
String |
toString() |
public TreeMethodExpression(TreeStore store, javax.el.FunctionMapper functions, javax.el.VariableMapper variables, TypeConverter converter, String expr, Class<?> returnType, Class<?>[] paramTypes)
null
, meaning "don't care".
If it is an lvalue expression, the parameter types must not be null
.
If it is literal text, the expected return type must not be void
.store
- used to get the parse tree from.functions
- the function mapper used to bind functionsvariables
- the variable mapper used to bind variablesexpr
- the expression stringreturnType
- the expected return type (may be null
)paramTypes
- the expected parameter types (must not be null
for lvalues)public javax.el.MethodInfo getMethodInfo(javax.el.ELContext context) throws javax.el.ELException
getMethodInfo
in class javax.el.MethodExpression
context
- used to resolve properties (base.property
and base[property]
)null
for literal expressionsjavax.el.ELException
- if evaluation fails (e.g. suitable method not found)public String getExpressionString()
getExpressionString
in class javax.el.Expression
public Object invoke(javax.el.ELContext context, Object[] paramValues) throws javax.el.ELException
invoke
in class javax.el.MethodExpression
context
- used to resolve properties (base.property
and base[property]
)paramValues
- null
if this is a literal text expressionjavax.el.ELException
- if evaluation fails (e.g. suitable method not found)public boolean isLiteralText()
isLiteralText
in class javax.el.Expression
true
if this is a literal text expressionpublic boolean isParmetersProvided()
isParmetersProvided
in class javax.el.MethodExpression
true
if this is a method invocation expressionpublic boolean isDeferred()
true
if this is a deferred expression (starting with #{
)public boolean equals(Object obj)
equals
in class javax.el.Expression
public int hashCode()
hashCode
in class javax.el.Expression
public void dump(PrintWriter writer)
writer
- Copyright © 2006–2017 Odysseus Software GmbH. All rights reserved.