public class ExtensionAwareEvaluationContextProvider extends Object implements EvaluationContextProvider
EvaluationContextProvider
that assembles an EvaluationContext
from a list of
EvaluationContextExtension
instances.DEFAULT
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 . |
Modifier and Type | Method and Description |
---|---|
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 . |
public ExtensionAwareEvaluationContextProvider(ListableBeanFactory beanFactory)
ExtensionAwareEvaluationContextProvider
with extensions looked up lazily from the given
BeanFactory
.beanFactory
- the ListableBeanFactory
to lookup extensions from.public ExtensionAwareEvaluationContextProvider(Collection<? extends ExtensionIdAware> extensions)
ExtensionAwareEvaluationContextProvider
for the given EvaluationContextExtension
s.extensions
- must not be null.public ExtensionAwareEvaluationContextProvider(Lazy<? extends Collection<? extends ExtensionIdAware>> extensions)
public StandardEvaluationContext getEvaluationContext(Object rootObject)
EvaluationContextProvider
EvaluationContext
built using the given parameter values.getEvaluationContext
in interface EvaluationContextProvider
rootObject
- the root object to set in the EvaluationContext
.public StandardEvaluationContext getEvaluationContext(Object rootObject, ExpressionDependencies dependencies)
EvaluationContextProvider
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
.getEvaluationContext
in interface EvaluationContextProvider
rootObject
- the root object to set in the EvaluationContext
.dependencies
- the requested expression dependencies to be available.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.