org.springframework.data.spel

## Class ExtensionAwareEvaluationContextProvider

- java.lang.Object
- - org.springframework.data.spel.ExtensionAwareEvaluationContextProvider

All Implemented Interfaces:
  EvaluationContextProvider

    public class ExtensionAwareEvaluationContextProvider
    extends Object
    implements EvaluationContextProvider

An `EvaluationContextProvider` that assembles an `EvaluationContext` from a list of `EvaluationContextExtension` instances.

Since:
  2.1
Author:
  Thomas Darimont, Oliver Gierke, Christoph Strobl, Jens Schauder, Mark Paluch

### Field Summary

### Fields inherited from interface org.springframework.data.spel.EvaluationContextProvider

`DEFAULT`

### Constructor Summary

Constructors
Constructor and Description
`ExtensionAwareEvaluationContextProvider(Collection<? extends ExtensionIdAware> extensions)` Creates a new `ExtensionAwareEvaluationContextProvider` for the given `EvaluationContextExtension`s.
`ExtensionAwareEvaluationContextProvider(Lazy<? extends Collection<? extends ExtensionIdAware>> extensions)`
`ExtensionAwareEvaluationContextProvider(ListableBeanFactory beanFactory)` Creates a new `ExtensionAwareEvaluationContextProvider` with extensions looked up lazily from the given `BeanFactory`.

### Method Summary

All Methods Instance Methods Concrete Methods
`StandardEvaluationContext` `getEvaluationContext(Object rootObject)` Return a `EvaluationContext` built using the given parameter values.
`StandardEvaluationContext` `getEvaluationContext(Object rootObject, ExpressionDependencies dependencies)` Return a tailored `EvaluationContext` built using the given parameter values and considering `expression dependencies`.

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

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

### Constructor Detail

#### ExtensionAwareEvaluationContextProvider

    public ExtensionAwareEvaluationContextProvider(ListableBeanFactory beanFactory)

Creates a new `ExtensionAwareEvaluationContextProvider` with extensions looked up lazily from the given `BeanFactory`.

Parameters:
  `beanFactory` - the `ListableBeanFactory` to lookup extensions from.

#### ExtensionAwareEvaluationContextProvider

    public ExtensionAwareEvaluationContextProvider(Collection<? extends ExtensionIdAware> extensions)

Creates a new `ExtensionAwareEvaluationContextProvider` for the given `EvaluationContextExtension`s.

Parameters:
  `extensions` - must not be null.

#### ExtensionAwareEvaluationContextProvider

    public ExtensionAwareEvaluationContextProvider(Lazy<? extends Collection<? extends ExtensionIdAware>> extensions)

### Method Detail

#### getEvaluationContext

    public StandardEvaluationContext getEvaluationContext(Object rootObject)

Description copied from interface: `EvaluationContextProvider`
Return a `EvaluationContext` built using the given parameter values.

Specified by:
  `getEvaluationContext` in interface `EvaluationContextProvider`
Parameters:
  `rootObject` - the root object to set in the `EvaluationContext`.
Returns:

#### getEvaluationContext

    public StandardEvaluationContext getEvaluationContext(Object rootObject,
                                                          ExpressionDependencies dependencies)

Description copied from interface: `EvaluationContextProvider`
Return a tailored `EvaluationContext` built using the given parameter values and considering `expression dependencies`. The returned `EvaluationContext` may contain a reduced visibility of methods and properties/fields according to the required `expression dependencies`.

Specified by:
  `getEvaluationContext` in interface `EvaluationContextProvider`
Parameters:
  `rootObject` - the root object to set in the `EvaluationContext`.
  `dependencies` - the requested expression dependencies to be available.
Returns: