Class ELContextWrapper
java.lang.Object
jakarta.el.ELContext
org.apache.jasper.el.ELContextWrapper
Simple ELContextWrapper for runtime evaluation of EL w/ dynamic FunctionMappers
-
Constructor Summary
ConstructorsConstructorDescriptionELContextWrapper(ELContext target, FunctionMapper fnMapper) Construct a new ELContextWrapper. -
Method Summary
Modifier and TypeMethodDescriptiongetContext(Class<?> key) Obtain the context object for the given key.Returns the ELResolver used to resolve properties and method invocations during expression evaluation.Returns the FunctionMapper used to resolve EL function names to Java methods during expression evaluation.Returns the locale associated with this EL context.Returns the VariableMapper used to resolve EL variable names toValueExpressioninstances during expression evaluation.booleanReturns whether a property has been resolved during the current evaluation step.voidputContext(Class<?> key, Object contextObject) Add an object to this EL context under the given key.voidSets the locale for this EL context.voidsetPropertyResolved(boolean resolved) Sets the internal flag indicating whether a property has been resolved during the current evaluation step.
-
Constructor Details
-
ELContextWrapper
Construct a new ELContextWrapper.- Parameters:
target- The target ELContext to wrapfnMapper- The function mapper to use
-
-
Method Details
-
getELResolver
Description copied from class:jakarta.el.ELContextReturns the ELResolver used to resolve properties and method invocations during expression evaluation.- Specified by:
getELResolverin classELContext- Returns:
- the ELResolver for this context
-
getFunctionMapper
Description copied from class:jakarta.el.ELContextReturns the FunctionMapper used to resolve EL function names to Java methods during expression evaluation.- Specified by:
getFunctionMapperin classELContext- Returns:
- the FunctionMapper for this context
-
getVariableMapper
Description copied from class:jakarta.el.ELContextReturns the VariableMapper used to resolve EL variable names toValueExpressioninstances during expression evaluation.- Specified by:
getVariableMapperin classELContext- Returns:
- the VariableMapper for this context
-
getContext
Description copied from class:jakarta.el.ELContextObtain the context object for the given key.- Overrides:
getContextin classELContext- Parameters:
key- The key of the required context object- Returns:
- The value of the context object associated with the given key
-
getLocale
Description copied from class:jakarta.el.ELContextReturns the locale associated with this EL context. The locale is used for type conversion operations such as parsing numbers and dates during expression evaluation. -
isPropertyResolved
public boolean isPropertyResolved()Description copied from class:jakarta.el.ELContextReturns whether a property has been resolved during the current evaluation step. ELResolver implementations callELContext.setPropertyResolved(boolean)to indicate resolution, and the expression evaluator checks this flag to determine if resolution was successful.- Overrides:
isPropertyResolvedin classELContext- Returns:
trueif a property has been resolved,falseotherwise
-
putContext
Description copied from class:jakarta.el.ELContextAdd an object to this EL context under the given key.- Overrides:
putContextin classELContext- Parameters:
key- The key under which to store the objectcontextObject- The object to add- Throws:
NullPointerException- If the supplied key or context isnull
-
setLocale
Description copied from class:jakarta.el.ELContextSets the locale for this EL context. The locale is used for type conversion operations such as parsing numbers and dates during expression evaluation. -
setPropertyResolved
public void setPropertyResolved(boolean resolved) Description copied from class:jakarta.el.ELContextSets the internal flag indicating whether a property has been resolved during the current evaluation step. This method is used byELResolverimplementations to signal that they have handled the current base/property combination.- Overrides:
setPropertyResolvedin classELContext- Parameters:
resolved-trueif a property has been resolved,falseotherwise
-