| javax.el.MethodExpression de.odysseus.el.TreeMethodExpression
Method Summary | |
public void | dump(PrintWriter writer) Print the parse tree. | public 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. | public String | getExpressionString() | public MethodInfo | getMethodInfo(ELContext context) Evaluates the expression and answers information about the method
Parameters: context - used to resolve properties (base.property and base[property] ) method information or null for literal expressions throws: ELException - if evaluation fails (e.g. | public int | hashCode() | public Object | invoke(ELContext context, Object[] paramValues) Evaluates the expression and invokes the method.
Parameters: context - used to resolve properties (base.property and base[property] ) method result or null if this is a literal text expression throws: ELException - if evaluation fails (e.g. | public boolean | isDeferred() | public boolean | isLiteralText() | public String | toString() |
TreeMethodExpression | public TreeMethodExpression(TreeStore store, FunctionMapper functions, VariableMapper variables, String expr, Class> returnType, Class>[] paramTypes)(Code) | | Create a new method expression.
The expression must be an lvalue expression or literal text.
The expected return type may be 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 .
Parameters: store - used to get the parse tree from. Parameters: functions - the function mapper used to bind functions Parameters: variables - the variable mapper used to bind variables Parameters: expr - the expression string Parameters: returnType - the expected return type (may be null ) Parameters: paramTypes - the expected parameter types (must not be null for lvalues) |
dump | public void dump(PrintWriter writer)(Code) | | Print the parse tree.
Parameters: writer - |
equals | public boolean equals(Object obj)(Code) | | 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.
Two method expressions are equal if
- their builders are equal
- their structural id's are equal
- their bindings are equal
- their expected types match (see below)
- their parameter types are equal (no-text method expressions only)
For text method expressions, the two expected types match if both types are the
same or one of them is null and the other is Object.class .
For non-text method expressions, the expected types match if both types are the same
or one of them is null .
|
getExpressionString | public String getExpressionString()(Code) | | |
getMethodInfo | public MethodInfo getMethodInfo(ELContext context) throws ELException(Code) | | Evaluates the expression and answers information about the method
Parameters: context - used to resolve properties (base.property and base[property] ) method information or null for literal expressions throws: ELException - if evaluation fails (e.g. suitable method not found) |
hashCode | public int hashCode()(Code) | | |
invoke | public Object invoke(ELContext context, Object[] paramValues) throws ELException(Code) | | Evaluates the expression and invokes the method.
Parameters: context - used to resolve properties (base.property and base[property] ) method result or null if this is a literal text expression throws: ELException - if evaluation fails (e.g. suitable method not found) |
isDeferred | public boolean isDeferred()(Code) | | Answer true if this is a deferred expression (starting with #{ )
|
isLiteralText | public boolean isLiteralText()(Code) | | true if this is a literal text expression |
|
|