EvaluationContext (Apache Tomcat 9.0.107 API Documentation)
Description: declaration: package: org.apache.el.lang, class: EvaluationContext

# Class EvaluationContext

java.lang.Object
javax.el.ELContext
org.apache.el.lang.EvaluationContext

public final class EvaluationContext extends ELContext

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addEvaluationListener(EvaluationListener listener)`
  Register an EvaluationListener with this ELContext.
  `Object`
  `convertToType(Object obj, Class<?> 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`
  `exitLambdaScope()`
  Called after evaluating a lambda expression to signal that the arguments are no longer required.
  `Object`
  `getContext(Class key)`
  Obtain the context object for the given key.
  `ELContext`
  `getELContext()`
  `ELResolver`
  `getELResolver()`
  `List<EvaluationListener>`
  `getEvaluationListeners()`
  Obtain the list of registered EvaluationListeners.
  `FunctionMapper`
  `getFunctionMapper()`
  `ImportHandler`
  `getImportHandler()`
  Obtain the ImportHandler for this ELContext, creating one if necessary.
  `Object`
  `getLambdaArgument(String name)`
  Obtain the value of the lambda argument with the given name.
  `LambdaExpressionNestedState`
  `getLambdaExpressionNestedState()`
  `Locale`
  `getLocale()`
  `VariableMapper`
  `getVariableMapper()`
  `boolean`
  `isLambdaArgument(String name)`
  Determine if the specified name is recognised as the name of a lambda argument.
  `boolean`
  `isPropertyResolved()`
  `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`
  `setLocale(Locale locale)`
  `void`
  `setPropertyResolved(boolean resolved)`
  `void`
  `setPropertyResolved(Object base, Object property)`
  Mark the given property as resolved and notify any interested listeners.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### EvaluationContext

    public EvaluationContext(ELContext elContext, FunctionMapper fnMapper, VariableMapper varMapper)

- ## Method Details

  - ### getELContext

    public ELContext getELContext()

  - ### getFunctionMapper

    public FunctionMapper getFunctionMapper()
    Specified by:
      `getFunctionMapper` in class `ELContext`

  - ### getVariableMapper

    public VariableMapper getVariableMapper()
    Specified by:
      `getVariableMapper` in class `ELContext`

  - ### getContext

    public Object getContext(Class key)
    Description copied from class: `javax.el.ELContext`
    Obtain the context object for the given key.
    Overrides:
      `getContext` in class `ELContext`
    Parameters:
      `key` - The key of the required context object
    Returns:
      The value of the context object associated with the given key

  - ### getELResolver

    public ELResolver getELResolver()
    Specified by:
      `getELResolver` in class `ELContext`

  - ### isPropertyResolved

    public boolean isPropertyResolved()
    Overrides:
      `isPropertyResolved` in class `ELContext`

  - ### putContext

    public void putContext(Class key, Object contextObject)
    Description copied from class: `javax.el.ELContext`
    Add an object to this EL context under the given key.
    Overrides:
      `putContext` in class `ELContext`
    Parameters:
      `key` - The key under which to store the object
      `contextObject` - The object to add

  - ### setPropertyResolved

    public void setPropertyResolved(boolean resolved)
    Overrides:
      `setPropertyResolved` in class `ELContext`

  - ### getLocale

    public Locale getLocale()
    Overrides:
      `getLocale` in class `ELContext`

  - ### setLocale

    public void setLocale(Locale locale)
    Overrides:
      `setLocale` in class `ELContext`

  - ### setPropertyResolved

    public void setPropertyResolved(Object base, Object property)
    Description copied from class: `javax.el.ELContext`
    Mark the given property as resolved and notify any interested listeners.
    Overrides:
      `setPropertyResolved` in class `ELContext`
    Parameters:
      `base` - The base object on which the property was found
      `property` - The property that was resolved

  - ### getImportHandler

    public ImportHandler getImportHandler()
    Description copied from class: `javax.el.ELContext`
    Obtain the ImportHandler for this ELContext, creating one if necessary. This method is not thread-safe.
    Overrides:
      `getImportHandler` in class `ELContext`
    Returns:
      the ImportHandler for this ELContext.

  - ### addEvaluationListener

    public void addEvaluationListener(EvaluationListener listener)
    Description copied from class: `javax.el.ELContext`
    Register an EvaluationListener with this ELContext.
    Overrides:
      `addEvaluationListener` in class `ELContext`
    Parameters:
      `listener` - The EvaluationListener to register

  - ### getEvaluationListeners

    public List<EvaluationListener> getEvaluationListeners()
    Description copied from class: `javax.el.ELContext`
    Obtain the list of registered EvaluationListeners.
    Overrides:
      `getEvaluationListeners` in class `ELContext`
    Returns:
      A list of the EvaluationListener registered with this ELContext

  - ### notifyBeforeEvaluation

    public void notifyBeforeEvaluation(String expression)
    Description copied from class: `javax.el.ELContext`
    Notify interested listeners that an expression will be evaluated.
    Overrides:
      `notifyBeforeEvaluation` in class `ELContext`
    Parameters:
      `expression` - The expression that will be evaluated

  - ### notifyAfterEvaluation

    public void notifyAfterEvaluation(String expression)
    Description copied from class: `javax.el.ELContext`
    Notify interested listeners that an expression has been evaluated.
    Overrides:
      `notifyAfterEvaluation` in class `ELContext`
    Parameters:
      `expression` - The expression that was evaluated

  - ### notifyPropertyResolved

    public void notifyPropertyResolved(Object base, Object property)
    Description copied from class: `javax.el.ELContext`
    Notify interested listeners that a property has been resolved.
    Overrides:
      `notifyPropertyResolved` in class `ELContext`
    Parameters:
      `base` - The object on which the property was resolved
      `property` - The property that was resolved

  - ### isLambdaArgument

    public boolean isLambdaArgument(String name)
    Description copied from class: `javax.el.ELContext`
    Determine if the specified name is recognised as the name of a lambda argument.
    Overrides:
      `isLambdaArgument` in class `ELContext`
    Parameters:
      `name` - The name of the lambda argument
    Returns:
      `true` if the name is recognised as the name of a lambda argument, otherwise `false`

  - ### getLambdaArgument

    public Object getLambdaArgument(String name)
    Description copied from class: `javax.el.ELContext`
    Obtain the value of the lambda argument with the given name.
    Overrides:
      `getLambdaArgument` in class `ELContext`
    Parameters:
      `name` - The name of the lambda argument
    Returns:
      The value of the specified argument

  - ### enterLambdaScope

    public void enterLambdaScope(Map<String,Object> arguments)
    Description copied from class: `javax.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 class `ELContext`
    Parameters:
      `arguments` - The arguments in scope for the current lambda expression.

  - ### exitLambdaScope

    public void exitLambdaScope()
    Description copied from class: `javax.el.ELContext`
    Called after evaluating a lambda expression to signal that the arguments are no longer required.
    Overrides:
      `exitLambdaScope` in class `ELContext`

  - ### convertToType

    public Object convertToType(Object obj, Class<?> type)
    Description copied from class: `javax.el.ELContext`
    Coerce the supplied object to the requested type.
    Overrides:
      `convertToType` in 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.

  - ### getLambdaExpressionNestedState

    public LambdaExpressionNestedState getLambdaExpressionNestedState()

  - ### setLambdaExpressionNestedState

    public void setLambdaExpressionNestedState(LambdaExpressionNestedState lambdaExpressionNestedState)