Top Description Methods
javax.cache.annotation

public Interface CacheInvocationContext<A extends java.lang.annotation.Annotation>

extends CacheMethodDetails<A extends Annotation>
Known Direct Subinterfaces
javax.cache.annotation.CacheKeyInvocationContext
Type Parameters
<A>
The type of annotation this context information is for. One of CacheResult, CachePut, CacheRemove, or CacheRemoveAll.
Imports
java.lang.annotation.Annotation

Runtime information about an intercepted method invocation for a method annotated with CacheResult, CachePut, CacheRemove, or CacheRemoveAll

Used with CacheResolver#resolveCache(CacheInvocationContext) to determine the javax.cache.Cache to use at runtime for the method invocation.

Author
Eric Dalquist
See Also
CacheResolver

Method Summary

Modifier and TypeMethod and Description
public CacheInvocationParameter[]

Returns:

An array of all parameters for the annotated method
getAllParameters
()

Returns a clone of the array of all method parameters.

public Object

Returns:

The object the intercepted method was invoked on.
getTarget
()

public <
The type of the expected underlying javax.cache.Cache implementation.
T
>
T

Returns:

an instance of the specified class
unwrap
(Class<T>
the class of the object to be returned. This is normally either the underlying implementation class or an interface that it implements.
cls
)

Return an object of the specified type to allow access to the provider-specific API.

Inherited from javax.cache.annotation.CacheMethodDetails:
getAnnotationsgetCacheAnnotationgetCacheNamegetMethod

Method Detail

getAllParametersback to summary
public CacheInvocationParameter[] getAllParameters()

Returns a clone of the array of all method parameters.

Returns:CacheInvocationParameter[]

An array of all parameters for the annotated method

getTargetback to summary
public Object getTarget()
Returns:Object

The object the intercepted method was invoked on.

unwrapback to summary
public <T> T unwrap(Class<T> cls)

Return an object of the specified type to allow access to the provider-specific API. If the provider's implementation does not support the specified class, the IllegalArgumentException is thrown.

Parameters
<T>
The type of the expected underlying javax.cache.Cache implementation.
cls:Class<T>

the class of the object to be returned. This is normally either the underlying implementation class or an interface that it implements.

Returns:T

an instance of the specified class

Exceptions
IllegalArgumentException:
if the provider doesn't support the specified class.