Package org.apache.jasper.el
Class ELContextWrapper
- java.lang.Object
-
- jakarta.el.ELContext
-
- org.apache.jasper.el.ELContextWrapper
-
public final class ELContextWrapper extends ELContext
Simple ELContextWrapper for runtime evaluation of EL w/ dynamic FunctionMappers
-
-
Constructor Summary
Constructors Constructor Description ELContextWrapper(ELContext target, FunctionMapper fnMapper)Construct a new ELContextWrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetContext(java.lang.Class<?> key)Obtain the context object for the given key.ELResolvergetELResolver()Returns the ELResolver used to resolve properties and method invocations during expression evaluation.FunctionMappergetFunctionMapper()Returns the FunctionMapper used to resolve EL function names to Java methods during expression evaluation.java.util.LocalegetLocale()Returns the locale associated with this EL context.VariableMappergetVariableMapper()Returns the VariableMapper used to resolve EL variable names toValueExpressioninstances during expression evaluation.booleanisPropertyResolved()Returns whether a property has been resolved during the current evaluation step.voidputContext(java.lang.Class<?> key, java.lang.Object contextObject)Add an object to this EL context under the given key.voidsetLocale(java.util.Locale locale)Sets 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.-
Methods inherited from class jakarta.el.ELContext
addEvaluationListener, convertToType, enterLambdaScope, exitLambdaScope, getEvaluationListeners, getImportHandler, getLambdaArgument, isLambdaArgument, notifyAfterEvaluation, notifyBeforeEvaluation, notifyPropertyResolved, setPropertyResolved
-
-
-
-
Constructor Detail
-
ELContextWrapper
public ELContextWrapper(ELContext target, FunctionMapper fnMapper)
Construct a new ELContextWrapper.- Parameters:
target- The target ELContext to wrapfnMapper- The function mapper to use
-
-
Method Detail
-
getELResolver
public ELResolver 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
public FunctionMapper 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
public VariableMapper 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
public java.lang.Object getContext(java.lang.Class<?> key)
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
public java.util.Locale 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
public void putContext(java.lang.Class<?> key, java.lang.Object contextObject) throws java.lang.NullPointerExceptionDescription 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:
java.lang.NullPointerException- If the supplied key or context isnull
-
setLocale
public void setLocale(java.util.Locale locale)
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
-
-