Package org.apache.el.lang
Class EvaluationContext
java.lang.Object
jakarta.el.ELContext
org.apache.el.lang.EvaluationContext
-
Constructor Summary
ConstructorDescriptionEvaluationContext
(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEvaluationListener
(EvaluationListener listener) Register an EvaluationListener with this ELContext.<T> T
convertToType
(Object obj, Class<T> type) Coerce the supplied object to the requested type.void
enterLambdaScope
(Map<String, Object> arguments) Called when starting to evaluate a lambda expression so that the arguments are available to the EL context during evaluation.void
Called after evaluating a lambda expression to signal that the arguments are no longer required.getContext
(Class<?> key) Obtain the context object for the given key.Obtain the list of registered EvaluationListeners.Obtain the ImportHandler for this ELContext, creating one if necessary.getLambdaArgument
(String name) Obtain the value of the lambda argument with the given name.boolean
isLambdaArgument
(String name) Determine if the specified name is recognised as the name of a lambda argument.boolean
void
notifyAfterEvaluation
(String expression) Notify interested listeners that an expression has been evaluated.void
notifyBeforeEvaluation
(String expression) Notify interested listeners that an expression will be evaluated.void
notifyPropertyResolved
(Object base, Object property) Notify interested listeners that a property has been resolved.void
putContext
(Class<?> key, Object contextObject) Add an object to this EL context under the given key.void
setLambdaExpressionNestedState
(LambdaExpressionNestedState lambdaExpressionNestedState) void
void
setPropertyResolved
(boolean resolved) void
setPropertyResolved
(Object base, Object property) Mark the given property as resolved and notify any interested listeners.
-
Constructor Details
-
EvaluationContext
-
-
Method Details
-
getELContext
-
getFunctionMapper
- Specified by:
getFunctionMapper
in classELContext
-
getVariableMapper
- Specified by:
getVariableMapper
in classELContext
-
getContext
Description copied from class:jakarta.el.ELContext
Obtain the context object for the given key.- Overrides:
getContext
in classELContext
- Parameters:
key
- The key of the required context object- Returns:
- The value of the context object associated with the given key
-
getELResolver
- Specified by:
getELResolver
in classELContext
-
isPropertyResolved
public boolean isPropertyResolved()- Overrides:
isPropertyResolved
in classELContext
-
putContext
Description copied from class:jakarta.el.ELContext
Add an object to this EL context under the given key.- Overrides:
putContext
in classELContext
- Parameters:
key
- The key under which to store the objectcontextObject
- The object to add
-
setPropertyResolved
public void setPropertyResolved(boolean resolved) - Overrides:
setPropertyResolved
in classELContext
-
getLocale
-
setLocale
-
setPropertyResolved
Description copied from class:jakarta.el.ELContext
Mark the given property as resolved and notify any interested listeners.- Overrides:
setPropertyResolved
in classELContext
- Parameters:
base
- The base object on which the property was foundproperty
- The property that was resolved
-
getImportHandler
Description copied from class:jakarta.el.ELContext
Obtain the ImportHandler for this ELContext, creating one if necessary. This method is not thread-safe.- Overrides:
getImportHandler
in classELContext
- Returns:
- the ImportHandler for this ELContext.
-
addEvaluationListener
Description copied from class:jakarta.el.ELContext
Register an EvaluationListener with this ELContext.- Overrides:
addEvaluationListener
in classELContext
- Parameters:
listener
- The EvaluationListener to register
-
getEvaluationListeners
Description copied from class:jakarta.el.ELContext
Obtain the list of registered EvaluationListeners.- Overrides:
getEvaluationListeners
in classELContext
- Returns:
- A list of the EvaluationListener registered with this ELContext
-
notifyBeforeEvaluation
Description copied from class:jakarta.el.ELContext
Notify interested listeners that an expression will be evaluated.- Overrides:
notifyBeforeEvaluation
in classELContext
- Parameters:
expression
- The expression that will be evaluated
-
notifyAfterEvaluation
Description copied from class:jakarta.el.ELContext
Notify interested listeners that an expression has been evaluated.- Overrides:
notifyAfterEvaluation
in classELContext
- Parameters:
expression
- The expression that was evaluated
-
notifyPropertyResolved
Description copied from class:jakarta.el.ELContext
Notify interested listeners that a property has been resolved.- Overrides:
notifyPropertyResolved
in classELContext
- Parameters:
base
- The object on which the property was resolvedproperty
- The property that was resolved
-
isLambdaArgument
Description copied from class:jakarta.el.ELContext
Determine if the specified name is recognised as the name of a lambda argument.- Overrides:
isLambdaArgument
in classELContext
- Parameters:
name
- The name of the lambda argument- Returns:
true
if the name is recognised as the name of a lambda argument, otherwisefalse
-
getLambdaArgument
Description copied from class:jakarta.el.ELContext
Obtain the value of the lambda argument with the given name.- Overrides:
getLambdaArgument
in classELContext
- Parameters:
name
- The name of the lambda argument- Returns:
- The value of the specified argument
-
enterLambdaScope
Description copied from class:jakarta.el.ELContext
Called when starting to evaluate a lambda expression so that the arguments are available to the EL context during evaluation.- Overrides:
enterLambdaScope
in classELContext
- Parameters:
arguments
- The arguments in scope for the current lambda expression.
-
exitLambdaScope
public void exitLambdaScope()Description copied from class:jakarta.el.ELContext
Called after evaluating a lambda expression to signal that the arguments are no longer required.- Overrides:
exitLambdaScope
in classELContext
-
convertToType
Description copied from class:jakarta.el.ELContext
Coerce the supplied object to the requested type.- Overrides:
convertToType
in classELContext
- Type Parameters:
T
- The type to which the object should be coerced- Parameters:
obj
- The object to be coercedtype
- The type to which the object should be coerced- Returns:
- An instance of the requested type.
-
getLambdaExpressionNestedState
-
setLambdaExpressionNestedState
-