Package javax.el
Class ELContext
- java.lang.Object
- 
- javax.el.ELContext
 
- 
- Direct Known Subclasses:
- StandardELContext
 
 public abstract class ELContext extends java.lang.Object
- 
- 
Constructor SummaryConstructors Constructor Description ELContext()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddEvaluationListener(EvaluationListener listener)Register an EvaluationListener with this ELContext.java.lang.ObjectconvertToType(java.lang.Object obj, java.lang.Class<?> type)Coerce the supplied object to the requested type.voidenterLambdaScope(java.util.Map<java.lang.String,java.lang.Object> arguments)Called when starting to evaluate a lambda expression so that the arguments are available to the EL context during evaluation.voidexitLambdaScope()Called after evaluating a lambda expression to signal that the arguments are no longer required.java.lang.ObjectgetContext(java.lang.Class key)Obtain the context object for the given key.abstract ELResolvergetELResolver()java.util.List<EvaluationListener>getEvaluationListeners()Obtain the list of registered EvaluationListeners.abstract FunctionMappergetFunctionMapper()ImportHandlergetImportHandler()Obtain the ImportHandler for this ELContext, creating one if necessary.java.lang.ObjectgetLambdaArgument(java.lang.String name)Obtain the value of the lambda argument with the given name.java.util.LocalegetLocale()abstract VariableMappergetVariableMapper()booleanisLambdaArgument(java.lang.String name)Determine if the specified name is recognised as the name of a lambda argument.booleanisPropertyResolved()voidnotifyAfterEvaluation(java.lang.String expression)Notify interested listeners that an expression has been evaluated.voidnotifyBeforeEvaluation(java.lang.String expression)Notify interested listeners that an expression will be evaluated.voidnotifyPropertyResolved(java.lang.Object base, java.lang.Object property)Notify interested listeners that a property has been resolved.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)voidsetPropertyResolved(boolean resolved)voidsetPropertyResolved(java.lang.Object base, java.lang.Object property)Mark the given property as resolved and notify any interested listeners.
 
- 
- 
- 
Method Detail- 
setPropertyResolvedpublic void setPropertyResolved(boolean resolved) 
 - 
setPropertyResolvedpublic void setPropertyResolved(java.lang.Object base, java.lang.Object property)Mark 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() 
 - 
putContextpublic void putContext(java.lang.Class key, java.lang.Object contextObject)Add 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:
- java.lang.NullPointerException- If the supplied key or context is- null
 
 - 
getContextpublic java.lang.Object getContext(java.lang.Class key) Obtain 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:
- java.lang.NullPointerException- If the supplied key is- null
 
 - 
getELResolverpublic abstract ELResolver getELResolver() 
 - 
getImportHandlerpublic ImportHandler getImportHandler() Obtain 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
 
 - 
getFunctionMapperpublic abstract FunctionMapper getFunctionMapper() 
 - 
getLocalepublic java.util.Locale getLocale() 
 - 
setLocalepublic void setLocale(java.util.Locale locale) 
 - 
getVariableMapperpublic abstract VariableMapper getVariableMapper() 
 - 
addEvaluationListenerpublic void addEvaluationListener(EvaluationListener listener) Register an EvaluationListener with this ELContext.- Parameters:
- listener- The EvaluationListener to register
- Since:
- EL 3.0
 
 - 
getEvaluationListenerspublic java.util.List<EvaluationListener> getEvaluationListeners() Obtain the list of registered EvaluationListeners.- Returns:
- A list of the EvaluationListener registered with this ELContext
- Since:
- EL 3.0
 
 - 
notifyBeforeEvaluationpublic void notifyBeforeEvaluation(java.lang.String expression) Notify interested listeners that an expression will be evaluated.- Parameters:
- expression- The expression that will be evaluated
- Since:
- EL 3.0
 
 - 
notifyAfterEvaluationpublic void notifyAfterEvaluation(java.lang.String expression) Notify interested listeners that an expression has been evaluated.- Parameters:
- expression- The expression that was evaluated
- Since:
- EL 3.0
 
 - 
notifyPropertyResolvedpublic void notifyPropertyResolved(java.lang.Object base, java.lang.Object property)Notify 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
 
 - 
isLambdaArgumentpublic boolean isLambdaArgument(java.lang.String name) Determine 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
 
 - 
getLambdaArgumentpublic java.lang.Object getLambdaArgument(java.lang.String name) Obtain 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
 
 - 
enterLambdaScopepublic void enterLambdaScope(java.util.Map<java.lang.String,java.lang.Object> arguments) Called 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
 
 - 
convertToTypepublic java.lang.Object convertToType(java.lang.Object obj, java.lang.Class<?> type)Coerce the supplied object to the requested type.- 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
 
 
- 
 
-