com.mockrunner.mock.web
Class MockExpressionEvaluator
java.lang.Object
javax.servlet.jsp.el.ExpressionEvaluator
com.mockrunner.mock.web.MockExpressionEvaluator
public class MockExpressionEvaluator
- extends javax.servlet.jsp.el.ExpressionEvaluator
Mock implementation of ExpressionEvaluator
.
This implementation cannot be used for real EL
expressions. Real EL expression support is only
available for the Unified Expression Language API
using the JasperJspFactory
.
Method Summary |
void |
addObject(java.lang.String expression,
java.lang.Object object)
Adds an object as a result for the specified expression. |
void |
clearObjects()
Clears all expressions and corresponding objects. |
java.lang.Object |
evaluate(java.lang.String expression,
java.lang.Class expectedType,
javax.servlet.jsp.el.VariableResolver resolver,
javax.servlet.jsp.el.FunctionMapper mapper)
|
javax.servlet.jsp.el.Expression |
parseExpression(java.lang.String expression,
java.lang.Class expectedType,
javax.servlet.jsp.el.FunctionMapper mapper)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockExpressionEvaluator
public MockExpressionEvaluator()
addObject
public void addObject(java.lang.String expression,
java.lang.Object object)
- Adds an object as a result for the specified expression.
- Parameters:
expression
- the expressionobject
- the object
clearObjects
public void clearObjects()
- Clears all expressions and corresponding objects.
evaluate
public java.lang.Object evaluate(java.lang.String expression,
java.lang.Class expectedType,
javax.servlet.jsp.el.VariableResolver resolver,
javax.servlet.jsp.el.FunctionMapper mapper)
throws javax.servlet.jsp.el.ELException
- Specified by:
evaluate
in class javax.servlet.jsp.el.ExpressionEvaluator
- Throws:
javax.servlet.jsp.el.ELException
parseExpression
public javax.servlet.jsp.el.Expression parseExpression(java.lang.String expression,
java.lang.Class expectedType,
javax.servlet.jsp.el.FunctionMapper mapper)
throws javax.servlet.jsp.el.ELException
- Specified by:
parseExpression
in class javax.servlet.jsp.el.ExpressionEvaluator
- Throws:
javax.servlet.jsp.el.ELException