The Spring Framework

org.springframework.mock.web
Class MockExpressionEvaluator

java.lang.Object
  extended by javax.servlet.jsp.el.ExpressionEvaluator
      extended by org.springframework.mock.web.MockExpressionEvaluator

public class MockExpressionEvaluator
extends ExpressionEvaluator

Mock implementation of the JSP 2.0 ExpressionEvaluator interface, delegating to the Jakarta JSTL ExpressionEvaluatorManager.

Used for testing the web framework; only necessary for testing applications when testing custom JSP tags.

Note that the Jakarta JSTL implementation (jstl.jar, standard.jar) has to be available on the class path to use this expression evaluator.

Since:
1.1.5
Author:
Juergen Hoeller
See Also:
ExpressionEvaluatorManager

Constructor Summary
MockExpressionEvaluator(PageContext pageContext)
          Create a new MockExpressionEvaluator for the given PageContext.
 
Method Summary
protected  Object doEvaluate(String expression, Class expectedType, FunctionMapper functionMapper)
           
 Object evaluate(String expression, Class expectedType, VariableResolver variableResolver, FunctionMapper functionMapper)
           
 Expression parseExpression(String expression, Class expectedType, FunctionMapper functionMapper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockExpressionEvaluator

public MockExpressionEvaluator(PageContext pageContext)
Create a new MockExpressionEvaluator for the given PageContext.

Parameters:
pageContext - the JSP PageContext to run in
Method Detail

parseExpression

public Expression parseExpression(String expression,
                                  Class expectedType,
                                  FunctionMapper functionMapper)
                           throws ELException
Specified by:
parseExpression in class ExpressionEvaluator
Throws:
ELException

evaluate

public Object evaluate(String expression,
                       Class expectedType,
                       VariableResolver variableResolver,
                       FunctionMapper functionMapper)
                throws ELException
Specified by:
evaluate in class ExpressionEvaluator
Throws:
ELException

doEvaluate

protected Object doEvaluate(String expression,
                            Class expectedType,
                            FunctionMapper functionMapper)
                     throws ELException
Throws:
ELException

The Spring Framework

Copyright © 2002-2008 The Spring Framework.