类 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.0ExpressionEvaluator
interface, 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.
- 从以下版本开始:
- 1.1.5
- 作者:
- Juergen Hoeller
- 另请参阅:
ExpressionEvaluatorManager
构造器概要
构造器 构造器 说明 MockExpressionEvaluator(PageContext pageContext)
Create a new MockExpressionEvaluator for the given PageContext.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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)
构造器详细资料
MockExpressionEvaluator
public MockExpressionEvaluator(PageContext pageContext)
Create a new MockExpressionEvaluator for the given PageContext.- 参数:
pageContext
- the JSP PageContext to run in
方法详细资料
parseExpression
public Expression parseExpression(String expression, Class expectedType, FunctionMapper functionMapper) throws ELException
- 指定者:
parseExpression
在类中ExpressionEvaluator
- 抛出:
ELException
evaluate
public Object evaluate(String expression, Class expectedType, VariableResolver variableResolver, FunctionMapper functionMapper) throws ELException
- 指定者:
evaluate
在类中ExpressionEvaluator
- 抛出:
ELException
doEvaluate
protected Object doEvaluate(String expression, Class expectedType, FunctionMapper functionMapper) throws ELException
- 抛出:
ELException