org.apache.myfaces.test.el
Class MockMethodExpression

java.lang.Object
  extended by javax.el.Expression
      extended by javax.el.MethodExpression
          extended by org.apache.myfaces.test.el.MockMethodExpression
All Implemented Interfaces:
Serializable

public class MockMethodExpression
extends javax.el.MethodExpression

Mock implementation of MethodExpression.

Since:
1.0.0
See Also:
Serialized Form

Constructor Summary
MockMethodExpression(String expression, Class[] signature, Class expectedType)
          Construct a new expression for the specified expression string.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockMethodExpression

public MockMethodExpression(String expression,
                            Class[] signature,
                            Class expectedType)

Construct a new expression for the specified expression string.

Parameters:
expression - Expression string to be evaluated
signature - Parameter signature of the method to be called
expectedType - Expected type of the result
Method Detail

equals

public boolean equals(Object obj)

Return true if this expression is equal to the specified expression.

Specified by:
equals in class javax.el.Expression
Parameters:
obj - Object to be compared

getExpressionString

public String getExpressionString()

Return the original String used to create this expression, unmodified.

Specified by:
getExpressionString in class javax.el.Expression

hashCode

public int hashCode()

Return the hash code for this expression.

Specified by:
hashCode in class javax.el.Expression

isLiteralText

public boolean isLiteralText()

Return true if the expression string for this expression contains only literal text.

Specified by:
isLiteralText in class javax.el.Expression

getMethodInfo

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.

Specified by:
getMethodInfo in class javax.el.MethodExpression
Parameters:
context - ELContext for this evaluation

invoke

public 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.

Specified by:
invoke in class javax.el.MethodExpression
Parameters:
context - ELContext for this evaluation
params - Parameters for this method call


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.