Top Description Fields Constructors Methods
org.springframework.cache.interceptor

pack-priv Class CacheEvaluationContextFactory

extends Object
Class Inheritance
Imports
java.lang.reflect.Method, java.util.function.Supplier, org.springframework.core.DefaultParameterNameDiscoverer, .ParameterNameDiscoverer, org.springframework.expression.spel.support.StandardEvaluationContext, org.springframework.lang.Nullable, org.springframework.util.function.SingletonSupplier

A factory for CacheEvaluationContext that makes sure that internal delegates are reused.
Author
Stephane Nicoll
Since
6.1.1

Field Summary

Modifier and TypeField and Description
private final StandardEvaluationContext
private Supplier<ParameterNameDiscoverer>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public CacheEvaluationContext

Returns:

a context suitable for this cache operation
forOperation
(CacheExpressionRootObject
the root object to use for the context
rootObject
,
Method
the target cache Method
targetMethod
,
Object[]
the arguments of the method invocation
args
)

Creates a CacheEvaluationContext for the specified operation.

public ParameterNameDiscoverer
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

originalContextback to summary
private final StandardEvaluationContext originalContext
parameterNameDiscovererback to summary
private Supplier<ParameterNameDiscoverer> parameterNameDiscoverer
Annotations
@Nullable

Constructor Detail

CacheEvaluationContextFactoryback to summary
pack-priv CacheEvaluationContextFactory(StandardEvaluationContext originalContext)

Method Detail

forOperationback to summary
public CacheEvaluationContext forOperation(CacheExpressionRootObject rootObject, Method targetMethod, Object[] args)

Creates a CacheEvaluationContext for the specified operation.

Parameters
rootObject:CacheExpressionRootObject

the root object to use for the context

targetMethod:Method

the target cache Method

args:Object[]

the arguments of the method invocation

Returns:CacheEvaluationContext

a context suitable for this cache operation

getParameterNameDiscovererback to summary
public ParameterNameDiscoverer getParameterNameDiscoverer()
setParameterNameDiscovererback to summary
public void setParameterNameDiscoverer(Supplier<ParameterNameDiscoverer> parameterNameDiscoverer)