public static class ELEvaluator.Context extends Object implements javax.servlet.jsp.el.VariableResolver, javax.servlet.jsp.el.FunctionMapper
All functions and variables in the context of an EL evaluator are accessible from EL expressions.
| Constructor and Description | 
|---|
ELEvaluator.Context()
Create an empty context. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addFunction(String prefix,
                      String functionName,
                      Method method)
Add a function to the context. 
 | 
Object | 
getVariable(String name)
Return a variable from the context. 
 | 
Method | 
resolveFunction(String prefix,
                              String name)
Resolve a function prefix:name. 
 | 
Object | 
resolveVariable(String name)
Resolve a variable name. 
 | 
void | 
setVariable(String name,
                      Object value)
Add a variable to the context. 
 | 
void | 
setVariables(Map<String,Object> vars)
Add variables to the context. 
 | 
public ELEvaluator.Context()
public void setVariables(Map<String,Object> vars)
vars - variables to add to the context.public void setVariable(String name, Object value)
name - variable name.value - variable value.public Object getVariable(String name)
name - variable name.public void addFunction(String prefix, String functionName, Method method)
prefix - function prefix.functionName - function name.method - method that will be invoked for the function, it must be a static and public method.public Object resolveVariable(String name) throws javax.servlet.jsp.el.ELException
resolveVariable in interface javax.servlet.jsp.el.VariableResolvername - variable name.javax.servlet.jsp.el.ELException - thrown if the variable is not defined in the context.public Method resolveFunction(String prefix, String name)
resolveFunction in interface javax.servlet.jsp.el.FunctionMapperprefix - function prefix.name - function name.Copyright © 2016 Apache Software Foundation. All rights reserved.