com.mockrunner.mock.web
Class MockExpressionEvaluator

java.lang.Object
  extended by javax.servlet.jsp.el.ExpressionEvaluator
      extended by com.mockrunner.mock.web.MockExpressionEvaluator

public class MockExpressionEvaluator
extends javax.servlet.jsp.el.ExpressionEvaluator

Mock implementation of ExpressionEvaluator. This implementation cannot be used for real EL expressions. Real EL expression support is only available for the Unified Expression Language API using the JasperJspFactory.


Constructor Summary
MockExpressionEvaluator()
           
 
Method Summary
 void addObject(java.lang.String expression, java.lang.Object object)
          Adds an object as a result for the specified expression.
 void clearObjects()
          Clears all expressions and corresponding objects.
 java.lang.Object evaluate(java.lang.String expression, java.lang.Class expectedType, javax.servlet.jsp.el.VariableResolver resolver, javax.servlet.jsp.el.FunctionMapper mapper)
           
 javax.servlet.jsp.el.Expression parseExpression(java.lang.String expression, java.lang.Class expectedType, javax.servlet.jsp.el.FunctionMapper mapper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockExpressionEvaluator

public MockExpressionEvaluator()
Method Detail

addObject

public void addObject(java.lang.String expression,
                      java.lang.Object object)
Adds an object as a result for the specified expression.

Parameters:
expression - the expression
object - the object

clearObjects

public void clearObjects()
Clears all expressions and corresponding objects.


evaluate

public java.lang.Object evaluate(java.lang.String expression,
                                 java.lang.Class expectedType,
                                 javax.servlet.jsp.el.VariableResolver resolver,
                                 javax.servlet.jsp.el.FunctionMapper mapper)
                          throws javax.servlet.jsp.el.ELException
Specified by:
evaluate in class javax.servlet.jsp.el.ExpressionEvaluator
Throws:
javax.servlet.jsp.el.ELException

parseExpression

public javax.servlet.jsp.el.Expression parseExpression(java.lang.String expression,
                                                       java.lang.Class expectedType,
                                                       javax.servlet.jsp.el.FunctionMapper mapper)
                                                throws javax.servlet.jsp.el.ELException
Specified by:
parseExpression in class javax.servlet.jsp.el.ExpressionEvaluator
Throws:
javax.servlet.jsp.el.ELException