org.springframework.cache.interceptor
Class ExpressionEvaluator

java.lang.Object
  extended by org.springframework.cache.interceptor.ExpressionEvaluator

 class ExpressionEvaluator
extends java.lang.Object

Utility class handling the SpEL expression parsing. Meant to be used as a reusable, thread-safe component.

Performs internal caching for performance reasons.

Since:
3.1
Author:
Costin Leau

Field Summary
private  java.util.Map<java.lang.reflect.Method,Expression> conditionCache
           
private  java.util.Map<java.lang.reflect.Method,Expression> keyCache
           
private  ParameterNameDiscoverer paramNameDiscoverer
           
private  SpelExpressionParser parser
           
private  java.util.Map<java.lang.reflect.Method,java.lang.reflect.Method> targetMethodCache
           
 
Constructor Summary
ExpressionEvaluator()
           
 
Method Summary
 boolean condition(java.lang.String conditionExpression, java.lang.reflect.Method method, EvaluationContext evalContext)
           
 EvaluationContext createEvaluationContext(java.util.Collection<Cache> caches, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object target, java.lang.Class<?> targetClass)
           
 java.lang.Object key(java.lang.String keyExpression, java.lang.reflect.Method method, EvaluationContext evalContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

private SpelExpressionParser parser

paramNameDiscoverer

private ParameterNameDiscoverer paramNameDiscoverer

conditionCache

private java.util.Map<java.lang.reflect.Method,Expression> conditionCache

keyCache

private java.util.Map<java.lang.reflect.Method,Expression> keyCache

targetMethodCache

private java.util.Map<java.lang.reflect.Method,java.lang.reflect.Method> targetMethodCache
Constructor Detail

ExpressionEvaluator

ExpressionEvaluator()
Method Detail

createEvaluationContext

public EvaluationContext createEvaluationContext(java.util.Collection<Cache> caches,
                                                 java.lang.reflect.Method method,
                                                 java.lang.Object[] args,
                                                 java.lang.Object target,
                                                 java.lang.Class<?> targetClass)

condition

public boolean condition(java.lang.String conditionExpression,
                         java.lang.reflect.Method method,
                         EvaluationContext evalContext)

key

public java.lang.Object key(java.lang.String keyExpression,
                            java.lang.reflect.Method method,
                            EvaluationContext evalContext)