类 CachedExpressionEvaluator
- java.lang.Object
- org.springframework.context.expression.CachedExpressionEvaluator
public abstract class CachedExpressionEvaluator extends Object
Shared utility class used to evaluate and cache SpEL expressions that are defined onAnnotatedElement.- 从以下版本开始:
- 4.2
- 作者:
- Stephane Nicoll
- 另请参阅:
AnnotatedElementKey
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected static classCachedExpressionEvaluator.ExpressionKeyAn expression key.
构造器概要
构造器 限定符 构造器 说明 protectedCachedExpressionEvaluator()Create a new instance with a defaultSpelExpressionParser.protectedCachedExpressionEvaluator(SpelExpressionParser parser)Create a new instance with the specifiedSpelExpressionParser.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected ExpressiongetExpression(Map<CachedExpressionEvaluator.ExpressionKey,Expression> cache, AnnotatedElementKey elementKey, String expression)Return theExpressionfor the specified SpEL valueprotected ParameterNameDiscoverergetParameterNameDiscoverer()Return a shared parameter name discoverer which caches data internally.protected SpelExpressionParsergetParser()Return theSpelExpressionParserto use.
构造器详细资料
CachedExpressionEvaluator
protected CachedExpressionEvaluator(SpelExpressionParser parser)
Create a new instance with the specifiedSpelExpressionParser.
CachedExpressionEvaluator
protected CachedExpressionEvaluator()
Create a new instance with a defaultSpelExpressionParser.
方法详细资料
getParser
protected SpelExpressionParser getParser()
Return theSpelExpressionParserto use.
getParameterNameDiscoverer
protected ParameterNameDiscoverer getParameterNameDiscoverer()
Return a shared parameter name discoverer which caches data internally.- 从以下版本开始:
- 4.3
getExpression
protected Expression getExpression(Map<CachedExpressionEvaluator.ExpressionKey,Expression> cache, AnnotatedElementKey elementKey, String expression)
Return theExpressionfor the specified SpEL valueParse the expression if it hasn't been already.
- 参数:
cache- the cache to useelementKey- the element on which the expression is definedexpression- the expression to parse