Package org.springframework.data.spel
Interface EvaluationContextProvider
- All Known Subinterfaces:
ReactiveEvaluationContextProvider
- All Known Implementing Classes:
ExtensionAwareEvaluationContextProvider
,ReactiveExtensionAwareEvaluationContextProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Provides a way to access a centrally defined potentially shared
StandardEvaluationContext
.- Since:
- 2.1
- Author:
- Thomas Darimont, Oliver Gierke, Christoph Strobl, Mark Paluch
-
Field Summary
Modifier and TypeFieldDescriptionstatic final EvaluationContextProvider
A simple defaultEvaluationContextProvider
returning aStandardEvaluationContext
with the given root object. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.expression.EvaluationContext
getEvaluationContext
(Object rootObject) Return aEvaluationContext
built using the given parameter values.default org.springframework.expression.EvaluationContext
getEvaluationContext
(Object rootObject, ExpressionDependencies dependencies) Return a tailoredEvaluationContext
built using the given parameter values and consideringexpression dependencies
.
-
Field Details
-
DEFAULT
A simple defaultEvaluationContextProvider
returning aStandardEvaluationContext
with the given root object.
-
-
Method Details
-
getEvaluationContext
Return aEvaluationContext
built using the given parameter values.- Parameters:
rootObject
- the root object to set in theEvaluationContext
.- Returns:
-
getEvaluationContext
default org.springframework.expression.EvaluationContext getEvaluationContext(Object rootObject, ExpressionDependencies dependencies) Return a tailoredEvaluationContext
built using the given parameter values and consideringexpression dependencies
. The returnedEvaluationContext
may contain a reduced visibility of methods and properties/fields according to the requiredexpression dependencies
.- Parameters:
rootObject
- the root object to set in theEvaluationContext
.dependencies
- the requested expression dependencies to be available.- Returns:
- Since:
- 2.4
-