com.mockrunner.mock.web
Class MockVariableResolver

java.lang.Object
  extended by com.mockrunner.mock.web.MockVariableResolver
All Implemented Interfaces:
javax.servlet.jsp.el.VariableResolver

public class MockVariableResolver
extends java.lang.Object
implements javax.servlet.jsp.el.VariableResolver

Mock implementation of VariableResolver. 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.


Constructor Summary
MockVariableResolver()
           
 
Method Summary
 void addVariable(java.lang.String name, java.lang.Object value)
          Adds a variable that resolves to the specified object.
 void clearVariables()
          Clears all variables.
 java.lang.Object resolveVariable(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockVariableResolver

public MockVariableResolver()
Method Detail

addVariable

public void addVariable(java.lang.String name,
                        java.lang.Object value)
Adds a variable that resolves to the specified object.

Parameters:
name - the variable name
value - the variable value

clearVariables

public void clearVariables()
Clears all variables.


resolveVariable

public java.lang.Object resolveVariable(java.lang.String name)
                                 throws javax.servlet.jsp.el.ELException
Specified by:
resolveVariable in interface javax.servlet.jsp.el.VariableResolver
Throws:
javax.servlet.jsp.el.ELException