public class MockExpressionEvaluator extends ExpressionEvaluator
ExpressionEvaluator
interface, delegating to the Apache JSTL ExpressionEvaluatorManager
.
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 classpath 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 java.lang.Object |
doEvaluate(java.lang.String expression,
java.lang.Class expectedType,
FunctionMapper functionMapper) |
java.lang.Object |
evaluate(java.lang.String expression,
java.lang.Class expectedType,
VariableResolver variableResolver,
FunctionMapper functionMapper) |
Expression |
parseExpression(java.lang.String expression,
java.lang.Class expectedType,
FunctionMapper functionMapper) |
public MockExpressionEvaluator(PageContext pageContext)
pageContext
- the JSP PageContext to run inpublic Expression parseExpression(java.lang.String expression, java.lang.Class expectedType, FunctionMapper functionMapper) throws ELException
parseExpression
in class ExpressionEvaluator
ELException
public java.lang.Object evaluate(java.lang.String expression, java.lang.Class expectedType, VariableResolver variableResolver, FunctionMapper functionMapper) throws ELException
evaluate
in class ExpressionEvaluator
ELException
protected java.lang.Object doEvaluate(java.lang.String expression, java.lang.Class expectedType, FunctionMapper functionMapper) throws ELException
ELException