Package org.apache.el.lang
Class EvaluationContext
- java.lang.Object
- 
- javax.el.ELContext
- 
- org.apache.el.lang.EvaluationContext
 
 
- 
 public final class EvaluationContext extends ELContext 
- 
- 
Constructor SummaryConstructors Constructor Description EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper)
 - 
Method SummaryAll Methods Instance 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.ELContextgetELContext()ELResolvergetELResolver()java.util.List<EvaluationListener>getEvaluationListeners()Obtain the list of registered EvaluationListeners.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.LambdaExpressionNestedStategetLambdaExpressionNestedState()java.util.LocalegetLocale()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.voidsetLambdaExpressionNestedState(LambdaExpressionNestedState lambdaExpressionNestedState)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.
 
- 
- 
- 
Constructor Detail- 
EvaluationContextpublic EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper) 
 
- 
 - 
Method Detail- 
getELContextpublic ELContext getELContext() 
 - 
getFunctionMapperpublic FunctionMapper getFunctionMapper() - Specified by:
- getFunctionMapperin class- ELContext
 
 - 
getVariableMapperpublic VariableMapper getVariableMapper() - Specified by:
- getVariableMapperin class- ELContext
 
 - 
getContextpublic java.lang.Object getContext(java.lang.Class key) Description copied from class:javax.el.ELContextObtain the context object for the given key.- Overrides:
- getContextin class- ELContext
- Parameters:
- key- The key of the required context object
- Returns:
- The value of the context object associated with the given key
 
 - 
getELResolverpublic ELResolver getELResolver() - Specified by:
- getELResolverin class- ELContext
 
 - 
isPropertyResolvedpublic boolean isPropertyResolved() - Overrides:
- isPropertyResolvedin class- ELContext
 
 - 
putContextpublic void putContext(java.lang.Class key, java.lang.Object contextObject)Description copied from class:javax.el.ELContextAdd an object to this EL context under the given key.- Overrides:
- putContextin class- ELContext
- Parameters:
- key- The key under which to store the object
- contextObject- The object to add
 
 - 
setPropertyResolvedpublic void setPropertyResolved(boolean resolved) - Overrides:
- setPropertyResolvedin class- ELContext
 
 - 
setPropertyResolvedpublic void setPropertyResolved(java.lang.Object base, java.lang.Object property)Description copied from class:javax.el.ELContextMark the given property as resolved and notify any interested listeners.- Overrides:
- setPropertyResolvedin class- ELContext
- Parameters:
- base- The base object on which the property was found
- property- The property that was resolved
 
 - 
getImportHandlerpublic ImportHandler getImportHandler() Description copied from class:javax.el.ELContextObtain the ImportHandler for this ELContext, creating one if necessary. This method is not thread-safe.- Overrides:
- getImportHandlerin class- ELContext
- Returns:
- the ImportHandler for this ELContext.
 
 - 
addEvaluationListenerpublic void addEvaluationListener(EvaluationListener listener) Description copied from class:javax.el.ELContextRegister an EvaluationListener with this ELContext.- Overrides:
- addEvaluationListenerin class- ELContext
- Parameters:
- listener- The EvaluationListener to register
 
 - 
getEvaluationListenerspublic java.util.List<EvaluationListener> getEvaluationListeners() Description copied from class:javax.el.ELContextObtain the list of registered EvaluationListeners.- Overrides:
- getEvaluationListenersin class- ELContext
- Returns:
- A list of the EvaluationListener registered with this ELContext
 
 - 
notifyBeforeEvaluationpublic void notifyBeforeEvaluation(java.lang.String expression) Description copied from class:javax.el.ELContextNotify interested listeners that an expression will be evaluated.- Overrides:
- notifyBeforeEvaluationin class- ELContext
- Parameters:
- expression- The expression that will be evaluated
 
 - 
notifyAfterEvaluationpublic void notifyAfterEvaluation(java.lang.String expression) Description copied from class:javax.el.ELContextNotify interested listeners that an expression has been evaluated.- Overrides:
- notifyAfterEvaluationin class- ELContext
- Parameters:
- expression- The expression that was evaluated
 
 - 
notifyPropertyResolvedpublic void notifyPropertyResolved(java.lang.Object base, java.lang.Object property)Description copied from class:javax.el.ELContextNotify interested listeners that a property has been resolved.- Overrides:
- notifyPropertyResolvedin class- ELContext
- Parameters:
- base- The object on which the property was resolved
- property- The property that was resolved
 
 - 
isLambdaArgumentpublic boolean isLambdaArgument(java.lang.String name) Description copied from class:javax.el.ELContextDetermine if the specified name is recognised as the name of a lambda argument.- Overrides:
- isLambdaArgumentin class- ELContext
- Parameters:
- name- The name of the lambda argument
- Returns:
- trueif the name is recognised as the name of a lambda argument, otherwise- false
 
 - 
getLambdaArgumentpublic java.lang.Object getLambdaArgument(java.lang.String name) Description copied from class:javax.el.ELContextObtain the value of the lambda argument with the given name.- Overrides:
- getLambdaArgumentin class- ELContext
- Parameters:
- name- The name of the lambda argument
- Returns:
- The value of the specified argument
 
 - 
enterLambdaScopepublic void enterLambdaScope(java.util.Map<java.lang.String,java.lang.Object> arguments) Description copied from class:javax.el.ELContextCalled when starting to evaluate a lambda expression so that the arguments are available to the EL context during evaluation.- Overrides:
- enterLambdaScopein class- ELContext
- Parameters:
- arguments- The arguments in scope for the current lambda expression.
 
 - 
exitLambdaScopepublic void exitLambdaScope() Description copied from class:javax.el.ELContextCalled after evaluating a lambda expression to signal that the arguments are no longer required.- Overrides:
- exitLambdaScopein class- ELContext
 
 - 
convertToTypepublic java.lang.Object convertToType(java.lang.Object obj, java.lang.Class<?> type)Description copied from class:javax.el.ELContextCoerce the supplied object to the requested type.- Overrides:
- convertToTypein class- ELContext
- Parameters:
- obj- The object to be coerced
- type- The type to which the object should be coerced
- Returns:
- An instance of the requested type.
 
 - 
getLambdaExpressionNestedStatepublic LambdaExpressionNestedState getLambdaExpressionNestedState() 
 - 
setLambdaExpressionNestedStatepublic void setLambdaExpressionNestedState(LambdaExpressionNestedState lambdaExpressionNestedState) 
 
- 
 
-