public static class ELEvaluator.Context extends java.lang.Object implements javax.servlet.jsp.el.VariableResolver, javax.servlet.jsp.el.FunctionMapper
| Constructor and Description |
|---|
ELEvaluator.Context()
Create an empty context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFunction(java.lang.String prefix,
java.lang.String functionName,
java.lang.reflect.Method method)
Add a function to the context.
|
java.lang.Object |
getVariable(java.lang.String name)
Return a variable from the context.
|
java.lang.reflect.Method |
resolveFunction(java.lang.String prefix,
java.lang.String name)
Resolve a function prefix:name.
|
java.lang.Object |
resolveVariable(java.lang.String name)
Resolve a variable name.
|
void |
setVariable(java.lang.String name,
java.lang.Object value)
Add a variable to the context.
|
void |
setVariables(java.util.Map<java.lang.String,java.lang.Object> vars)
Add variables to the context.
|
public ELEvaluator.Context()
public void setVariables(java.util.Map<java.lang.String,java.lang.Object> vars)
vars - variables to add to the context.public void setVariable(java.lang.String name, java.lang.Object value)
name - variable name.value - variable value.public java.lang.Object getVariable(java.lang.String name)
name - variable name.public void addFunction(java.lang.String prefix, java.lang.String functionName, java.lang.reflect.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 java.lang.Object resolveVariable(java.lang.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 java.lang.reflect.Method resolveFunction(java.lang.String prefix, java.lang.String name)
resolveFunction in interface javax.servlet.jsp.el.FunctionMapperprefix - function prefix.name - function name.Copyright © 2019 Apache Software Foundation. All Rights Reserved.