public class MockMethodExpression
extends javax.el.MethodExpression
Mock implementation of MethodExpression
.
Constructor and Description |
---|
MockMethodExpression(String expression,
Class[] signature,
Class expectedType)
Construct a new expression for the specified expression string.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Return
true if this expression is equal to the
specified expression. |
String |
getExpressionString()
Return the original String used to create this expression,
unmodified.
|
javax.el.MethodInfo |
getMethodInfo(javax.el.ELContext context)
Evaluate the expression relative to the specified context,
and return information about the actual implementation method.
|
int |
hashCode()
Return the hash code for this expression.
|
Object |
invoke(javax.el.ELContext context,
Object[] params)
Evaluate the expression relative to the specified ocntext,
and return the result after coercion to the expected result type.
|
boolean |
isLiteralText()
Return
true if the expression string for this expression
contains only literal text. |
public MockMethodExpression(String expression, Class[] signature, Class expectedType)
Construct a new expression for the specified expression string.
expression
- Expression string to be evaluatedsignature
- Parameter signature of the method to be calledexpectedType
- Expected type of the resultpublic boolean equals(Object obj)
Return true
if this expression is equal to the
specified expression.
equals
in class javax.el.Expression
obj
- Object to be comparedpublic String getExpressionString()
Return the original String used to create this expression, unmodified.
getExpressionString
in class javax.el.Expression
public int hashCode()
Return the hash code for this expression.
hashCode
in class javax.el.Expression
public boolean isLiteralText()
Return true
if the expression string for this expression
contains only literal text.
isLiteralText
in class javax.el.Expression
public javax.el.MethodInfo getMethodInfo(javax.el.ELContext context)
Evaluate the expression relative to the specified context, and return information about the actual implementation method.
getMethodInfo
in class javax.el.MethodExpression
context
- ELContext for this evaluationpublic Object invoke(javax.el.ELContext context, Object[] params)
Evaluate the expression relative to the specified ocntext, and return the result after coercion to the expected result type.
invoke
in class javax.el.MethodExpression
context
- ELContext for this evaluationparams
- Parameters for this method callCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.