Package org.springframework.mock.web
Class MockExpressionEvaluator
- java.lang.Object
 - javax.servlet.jsp.el.ExpressionEvaluator
 - org.springframework.mock.web.MockExpressionEvaluator
 
public class MockExpressionEvaluator extends ExpressionEvaluator
Mock implementation of the JSP 2.0ExpressionEvaluatorinterface, delegating to the Apache JSTL ExpressionEvaluatorManager.Used for testing the web framework; only necessary for testing applications when testing custom JSP tags.
Note that the Apache 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
Constructors Constructor Description MockExpressionEvaluator(PageContext pageContext)Create a new MockExpressionEvaluator for the given PageContext.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectdoEvaluate(String expression, Class expectedType, FunctionMapper functionMapper)Objectevaluate(String expression, Class expectedType, VariableResolver variableResolver, FunctionMapper functionMapper)ExpressionparseExpression(String expression, Class expectedType, FunctionMapper functionMapper)
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:
 parseExpressionin classExpressionEvaluator- Throws:
 ELException
evaluate
public Object evaluate(String expression, Class expectedType, VariableResolver variableResolver, FunctionMapper functionMapper) throws ELException
- Specified by:
 evaluatein classExpressionEvaluator- Throws:
 ELException
doEvaluate
protected Object doEvaluate(String expression, Class expectedType, FunctionMapper functionMapper) throws ELException
- Throws:
 ELException