Class SpELContext
java.lang.Object
org.springframework.data.mapping.model.SpELContext
- All Implemented Interfaces:
EvaluationContextProvider
Simple factory to create
SpelExpressionParser and EvaluationContext instances.- Author:
- Oliver Gierke
-
Field Summary
Fields inherited from interface org.springframework.data.spel.EvaluationContextProvider
DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionSpELContext(SpELContext source, BeanFactory factory) Copy constructor to create aSpELContextusing the given one'sPropertyAccessorandSpelExpressionParseras well as the givenBeanFactory.SpELContext(PropertyAccessor accessor) Creates a newSpELContextwith the givenPropertyAccessor.SpELContext(SpelExpressionParser parser, PropertyAccessor accessor) -
Method Summary
Modifier and TypeMethodDescriptiongetEvaluationContext(Object source) Return aEvaluationContextbuilt using the given parameter values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.spel.EvaluationContextProvider
getEvaluationContext
-
Constructor Details
-
SpELContext
- Parameters:
accessor-
-
SpELContext
Creates a newSpELContextusing the givenSpelExpressionParserandPropertyAccessor. Will default theSpelExpressionParserin case the given value for it is null.- Parameters:
parser-accessor-
-
SpELContext
Copy constructor to create aSpELContextusing the given one'sPropertyAccessorandSpelExpressionParseras well as the givenBeanFactory.- Parameters:
source-factory-
-
-
Method Details
-
getParser
-
getEvaluationContext
Description copied from interface:EvaluationContextProviderReturn aEvaluationContextbuilt using the given parameter values.- Specified by:
getEvaluationContextin interfaceEvaluationContextProvider- Parameters:
source- the root object to set in theEvaluationContext.- Returns:
-