public class MockExpressionEvaluator extends ExpressionEvaluator
ExpressionEvaluator
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.
ExpressionEvaluatorManager
Constructor and Description |
---|
MockExpressionEvaluator(PageContext pageContext)
Create a new MockExpressionEvaluator for the given PageContext.
|
Modifier and Type | Method and Description |
---|---|
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) |
public MockExpressionEvaluator(PageContext pageContext)
pageContext
- the JSP PageContext to run inpublic Expression parseExpression(String expression, Class expectedType, FunctionMapper functionMapper) throws ELException
parseExpression
in class ExpressionEvaluator
ELException
public Object evaluate(String expression, Class expectedType, VariableResolver variableResolver, FunctionMapper functionMapper) throws ELException
evaluate
in class ExpressionEvaluator
ELException
protected Object doEvaluate(String expression, Class expectedType, FunctionMapper functionMapper) throws ELException
ELException