|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.javax.el.Expression
org.camunda.bpm.engine.impl.javax.el.MethodExpression
org.camunda.bpm.engine.impl.juel.TreeMethodExpression
public final class TreeMethodExpression
A method expression is ready to be evaluated (by calling either
invoke(ELContext, Object[]) or getMethodInfo(ELContext)).
Instances of this class are usually created using an ExpressionFactoryImpl.
| Constructor Summary | |
|---|---|
TreeMethodExpression(TreeStore store,
FunctionMapper functions,
VariableMapper variables,
TypeConverter converter,
String expr,
Class<?> returnType,
Class<?>[] paramTypes)
Create a new method expression. |
|
| Method Summary | |
|---|---|
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()
Returns the original String used to create this Expression, unmodified. |
MethodInfo |
getMethodInfo(ELContext context)
Evaluates the expression and answers information about the method |
int |
hashCode()
Returns the hash code for this Expression. |
Object |
invoke(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()
Returns whether this expression was created from only literal text. |
boolean |
isParmetersProvided()
Return whether this MethodExpression was created with parameters. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TreeMethodExpression(TreeStore store,
FunctionMapper functions,
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)| Method Detail |
|---|
public MethodInfo getMethodInfo(ELContext context)
throws ELException
getMethodInfo in class MethodExpressioncontext - used to resolve properties (base.property and base[property])
null for literal expressions
ELException - if evaluation fails (e.g. suitable method not found)public String getExpressionString()
Expression
getExpressionString in class Expression
public Object invoke(ELContext context,
Object[] paramValues)
throws ELException
invoke in class MethodExpressioncontext - used to resolve properties (base.property and base[property])paramValues -
null if this is a literal text expression
ELException - if evaluation fails (e.g. suitable method not found)public boolean isLiteralText()
Expression
isLiteralText in class Expressiontrue if this is a literal text expressionpublic boolean isParmetersProvided()
MethodExpression
This method must return true if and only if parameters are specified in the EL,
using the expr-a.expr-b(...) syntax.
isParmetersProvided in class MethodExpressiontrue 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 Expressionobj - the Object to test for equality.
public int hashCode()
ExpressionExpression.equals(Object) method
on how two expressions can be equal if their expression Strings are different. Recall that if
two objects are equal according to the equals(Object) method, then calling the hashCode
method on each of the two objects must produce the same integer result. Implementations must
take special note and implement hashCode correctly.
hashCode in class ExpressionExpression.equals(Object),
Hashtable,
Object.hashCode()public String toString()
toString in class Objectpublic void dump(PrintWriter writer)
writer -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||