Class CachedExpressionEvaluator
java.lang.Object
org.springframework.context.expression.CachedExpressionEvaluator
Shared utility class used to evaluate and cache SpEL expressions that
are defined on an 
AnnotatedElement.- Since:
- 4.2
- Author:
- Stephane Nicoll
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static classAn expression key.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedCreate a new instance with the defaultSpelExpressionParser.protectedCreate a new instance with the specifiedSpelExpressionParser.
- 
Method SummaryModifier and TypeMethodDescriptionprotected ExpressiongetExpression(Map<CachedExpressionEvaluator.ExpressionKey, Expression> cache, AnnotatedElementKey elementKey, String expression) Return the parsedExpressionfor the specified SpEL expression.protected ParameterNameDiscovererReturn a shared parameter name discoverer which caches data internally.protected SpelExpressionParserReturn theSpelExpressionParserto use.protected ExpressionparseExpression(String expression) Parse the specifiedexpression.
- 
Constructor Details- 
CachedExpressionEvaluatorprotected CachedExpressionEvaluator()Create a new instance with the defaultSpelExpressionParser.
- 
CachedExpressionEvaluatorCreate a new instance with the specifiedSpelExpressionParser.
 
- 
- 
Method Details- 
getParserReturn theSpelExpressionParserto use.
- 
getParameterNameDiscovererReturn a shared parameter name discoverer which caches data internally.- Since:
- 4.3
 
- 
getExpressionprotected Expression getExpression(Map<CachedExpressionEvaluator.ExpressionKey, Expression> cache, AnnotatedElementKey elementKey, String expression) Return the parsedExpressionfor the specified SpEL expression.Parses the expression if it hasn't already been parsed and cached. - Parameters:
- cache- the cache to use
- elementKey- the- AnnotatedElementKeycontaining the element on which the expression is defined
- expression- the expression to parse
 
- 
parseExpressionParse the specifiedexpression.- Parameters:
- expression- the expression to parse
- Since:
- 5.3.13
 
 
-