Package de.odysseus.el.util
Class SimpleContext
- java.lang.Object
-
- javax.el.ELContext
-
- de.odysseus.el.util.SimpleContext
-
public class SimpleContext extends ELContext
Simple context implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classSimpleContext.Functions(package private) static classSimpleContext.Variables
-
Field Summary
Fields Modifier and Type Field Description private SimpleContext.Functionsfunctionsprivate ELResolverresolverprivate SimpleContext.Variablesvariables
-
Constructor Summary
Constructors Constructor Description SimpleContext()Create a context.SimpleContext(ELResolver resolver)Create a context, use the specified resolver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ELResolvergetELResolver()Get our resolver.FunctionMappergetFunctionMapper()Get our function mapper.VariableMappergetVariableMapper()Get our variable mapper.voidsetELResolver(ELResolver resolver)Set our resolver.voidsetFunction(java.lang.String prefix, java.lang.String localName, java.lang.reflect.Method method)Define a function.ValueExpressionsetVariable(java.lang.String name, ValueExpression expression)Define a variable.-
Methods inherited from class javax.el.ELContext
getContext, getLocale, isPropertyResolved, putContext, setLocale, setPropertyResolved
-
-
-
-
Field Detail
-
functions
private SimpleContext.Functions functions
-
variables
private SimpleContext.Variables variables
-
resolver
private ELResolver resolver
-
-
Constructor Detail
-
SimpleContext
public SimpleContext()
Create a context.
-
SimpleContext
public SimpleContext(ELResolver resolver)
Create a context, use the specified resolver.
-
-
Method Detail
-
setFunction
public void setFunction(java.lang.String prefix, java.lang.String localName, java.lang.reflect.Method method)Define a function.
-
setVariable
public ValueExpression setVariable(java.lang.String name, ValueExpression expression)
Define a variable.
-
getFunctionMapper
public FunctionMapper getFunctionMapper()
Get our function mapper.- Specified by:
getFunctionMapperin classELContext- Returns:
- The function mapper to be consulted for the resolution of EL functions.
-
getVariableMapper
public VariableMapper getVariableMapper()
Get our variable mapper.- Specified by:
getVariableMapperin classELContext- Returns:
- The variable mapper to be consulted for the resolution of EL variables.
-
getELResolver
public ELResolver getELResolver()
Get our resolver. Lazy initialize to aSimpleResolverif necessary.- Specified by:
getELResolverin classELContext- Returns:
- The resolver to be consulted for variable and property resolution during expression evaluation.
-
setELResolver
public void setELResolver(ELResolver resolver)
Set our resolver.- Parameters:
resolver-
-
-