Package jakarta.el
Class ELContext
java.lang.Object
jakarta.el.ELContext
- Direct Known Subclasses:
- StandardELContext
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddEvaluationListener(EvaluationListener listener) Register an EvaluationListener with this ELContext.<T> TconvertToType(Object obj, Class<T> type) Coerce the supplied object to the requested type.voidenterLambdaScope(Map<String, Object> arguments) Called when starting to evaluate a lambda expression so that the arguments are available to the EL context during evaluation.voidCalled 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.abstract ELResolverObtain the list of registered EvaluationListeners.abstract FunctionMapperObtain the ImportHandler for this ELContext, creating one if necessary.getLambdaArgument(String name) Obtain the value of the lambda argument with the given name.abstract VariableMapperbooleanisLambdaArgument(String name) Determine if the specified name is recognised as the name of a lambda argument.booleanvoidnotifyAfterEvaluation(String expression) Notify interested listeners that an expression has been evaluated.voidnotifyBeforeEvaluation(String expression) Notify interested listeners that an expression will be evaluated.voidnotifyPropertyResolved(Object base, Object property) Notify interested listeners that a property has been resolved.voidputContext(Class<?> key, Object contextObject) Add an object to this EL context under the given key.voidvoidsetPropertyResolved(boolean resolved) voidsetPropertyResolved(Object base, Object property) Mark the given property as resolved and notify any interested listeners.
- 
Constructor Details- 
ELContextpublic ELContext()
 
- 
- 
Method Details- 
setPropertyResolvedpublic void setPropertyResolved(boolean resolved) 
- 
setPropertyResolvedMark the given property as resolved and notify any interested listeners.- Parameters:
- base- The base object on which the property was found
- property- The property that was resolved
- Since:
- EL 3.0
 
- 
isPropertyResolvedpublic boolean isPropertyResolved()
- 
putContextAdd an object to this EL context under the given key.- Parameters:
- key- The key under which to store the object
- contextObject- The object to add
- Throws:
- NullPointerException- If the supplied key or context is- null
 
- 
getContextObtain the context object for the given key.- Parameters:
- key- The key of the required context object
- Returns:
- The value of the context object associated with the given key
- Throws:
- NullPointerException- If the supplied key is- null
 
- 
getELResolver
- 
getImportHandlerObtain the ImportHandler for this ELContext, creating one if necessary. This method is not thread-safe.- Returns:
- the ImportHandler for this ELContext.
- Since:
- EL 3.0
 
- 
getFunctionMapper
- 
getLocale
- 
setLocale
- 
getVariableMapper
- 
addEvaluationListenerRegister an EvaluationListener with this ELContext.- Parameters:
- listener- The EvaluationListener to register
- Since:
- EL 3.0
 
- 
getEvaluationListenersObtain the list of registered EvaluationListeners.- Returns:
- A list of the EvaluationListener registered with this ELContext
- Since:
- EL 3.0
 
- 
notifyBeforeEvaluationNotify interested listeners that an expression will be evaluated.- Parameters:
- expression- The expression that will be evaluated
- Since:
- EL 3.0
 
- 
notifyAfterEvaluationNotify interested listeners that an expression has been evaluated.- Parameters:
- expression- The expression that was evaluated
- Since:
- EL 3.0
 
- 
notifyPropertyResolvedNotify interested listeners that a property has been resolved.- Parameters:
- base- The object on which the property was resolved
- property- The property that was resolved
- Since:
- EL 3.0
 
- 
isLambdaArgumentDetermine if the specified name is recognised as the name of a lambda argument.- Parameters:
- name- The name of the lambda argument
- Returns:
- trueif the name is recognised as the name of a lambda argument, otherwise- false
- Since:
- EL 3.0
 
- 
getLambdaArgumentObtain the value of the lambda argument with the given name.- Parameters:
- name- The name of the lambda argument
- Returns:
- The value of the specified argument
- Since:
- EL 3.0
 
- 
enterLambdaScopeCalled when starting to evaluate a lambda expression so that the arguments are available to the EL context during evaluation.- Parameters:
- arguments- The arguments in scope for the current lambda expression.
- Since:
- EL 3.0
 
- 
exitLambdaScopepublic void exitLambdaScope()Called after evaluating a lambda expression to signal that the arguments are no longer required.- Since:
- EL 3.0
 
- 
convertToTypeCoerce the supplied object to the requested type.- Type Parameters:
- T- The type to which the object should be coerced
- Parameters:
- obj- The object to be coerced
- type- The type to which the object should be coerced
- Returns:
- An instance of the requested type.
- Throws:
- ELException- If the conversion fails
- Since:
- EL 3.0
 
 
-