diff --git a/org.springframework.aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj b/org.springframework.aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj
index 7955fcdcbd..fd58ca3fa1 100644
--- a/org.springframework.aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj
+++ b/org.springframework.aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj
@@ -16,28 +16,23 @@
package org.springframework.cache.aspectj;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.util.concurrent.Callable;
import org.aspectj.lang.annotation.SuppressAjWarnings;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.cache.interceptor.CacheAspectSupport;
import org.springframework.cache.interceptor.CacheOperationSource;
-import org.springframework.cache.interceptor.CacheAspectSupport.Invoker;
/**
- * Abstract superaspect for AspectJ cache aspects. Concrete
- * subaspects will implement the cacheMethodExecution()
- * pointcut using a strategy such as Java 5 annotations.
+ * Abstract superaspect for AspectJ cache aspects. Concrete subaspects will implement the
+ * {@link #cacheMethodExecution} pointcut using a strategy such as Java 5 annotations.
*
- *
Suitable for use inside or outside the Spring IoC container. - * Set the "cacheManager" property appropriately, allowing - * use of any cache implementation supported by Spring. + *
Suitable for use inside or outside the Spring IoC container. Set the + * {@link #setCacheManager cacheManager} property appropriately, allowing use of any cache + * implementation supported by Spring. * - *
NB: If a method implements an interface that is itself - * cache annotated, the relevant Spring cache definition - * will not be resolved. + *
NB: If a method implements an interface that is itself cache annotated, the + * relevant Spring cache definition will not be resolved. * * @author Costin Leau * @since 3.1 @@ -49,8 +44,8 @@ public abstract aspect AbstractCacheAspect extends CacheAspectSupport { /** * Construct object using the given caching metadata retrieval strategy. - * @param cos {@link CacheOperationSource} implementation, retrieving Spring - * cache metadata for each joinpoint. + * @param cos {@link CacheOperationSource} implementation, retrieving Spring cache + * metadata for each joinpoint. */ protected AbstractCacheAspect(CacheOperationSource... cos) { setCacheOperationSources(cos); @@ -71,9 +66,7 @@ public abstract aspect AbstractCacheAspect extends CacheAspectSupport { } /** - * Concrete subaspects must implement this pointcut, to identify - * cached methods. For each selected joinpoint, {@link CacheOperationDefinition} - * will be retrieved using Spring's {@link CacheOperationSource} interface. + * Concrete subaspects must implement this pointcut, to identify cached methods. */ protected abstract pointcut cacheMethodExecution(Object cachedObject); diff --git a/org.springframework.aspects/src/main/java/org/springframework/cache/aspectj/AnnotationCacheAspect.aj b/org.springframework.aspects/src/main/java/org/springframework/cache/aspectj/AnnotationCacheAspect.aj index 87614cf8c3..826ab6bdc7 100644 --- a/org.springframework.aspects/src/main/java/org/springframework/cache/aspectj/AnnotationCacheAspect.aj +++ b/org.springframework.aspects/src/main/java/org/springframework/cache/aspectj/AnnotationCacheAspect.aj @@ -21,21 +21,20 @@ import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; /** - * Concrete AspectJ cache aspect using Spring's {@link Cacheable} annotation. + * Concrete AspectJ cache aspect using Spring's @{@link Cacheable} annotation. * - *
When using this aspect, you must annotate the implementation class - * (and/or methods within that class), not the interface (if any) that - * the class implements. AspectJ follows Java's rule that annotations on - * interfaces are not inherited. + *
When using this aspect, you must annotate the implementation class (and/or + * methods within that class), not the interface (if any) that the class + * implements. AspectJ follows Java's rule that annotations on interfaces are not + * inherited. * - *
A {@link Cacheable} annotation on a class specifies the default caching - * semantics for the execution of any public operation in the class. + *
A {@code @Cacheable} annotation on a class specifies the default caching semantics + * for the execution of any public operation in the class. * - *
A {@link Cacheable} annotation on a method within the class overrides the - * default caching semantics given by the class annotation (if present). - * Any method may be annotated (regardless of visibility). - * Annotating non-public methods directly is the only way - * to get caching demarcation for the execution of such operations. + *
A {@code @Cacheable} annotation on a method within the class overrides the default + * caching semantics given by the class annotation (if present). Any method may be + * annotated (regardless of visibility). Annotating non-public methods directly is the + * only way to get caching demarcation for the execution of such operations. * * @author Costin Leau * @since 3.1 @@ -47,41 +46,40 @@ public aspect AnnotationCacheAspect extends AbstractCacheAspect { } /** - * Matches the execution of any public method in a type with the - * {@link Cacheable} annotation, or any subtype of a type with the - * {@link Cacheable} annotation. + * Matches the execution of any public method in a type with the @{@link Cacheable} + * annotation, or any subtype of a type with the {@code @Cacheable} annotation. */ private pointcut executionOfAnyPublicMethodInAtCacheableType() : execution(public * ((@Cacheable *)+).*(..)) && @this(Cacheable); /** - * Matches the execution of any public method in a type with the - * {@link CacheEvict} annotation, or any subtype of a type with the - * {@link CacheEvict} annotation. + * Matches the execution of any public method in a type with the @{@link CacheEvict} + * annotation, or any subtype of a type with the {@code CacheEvict} annotation. */ private pointcut executionOfAnyPublicMethodInAtCacheEvictType() : execution(public * ((@CacheEvict *)+).*(..)) && @this(CacheEvict); /** - * Matches the execution of any method with the - * Cacheable annotation. + * Matches the execution of any method with the @{@link Cacheable} annotation. */ private pointcut executionOfCacheableMethod() : execution(* *(..)) && @annotation(Cacheable); /** - * Matches the execution of any method with the {@link CacheEvict} annotation. + * Matches the execution of any method with the @{@link CacheEvict} annotation. */ private pointcut executionOfCacheEvictMethod() : execution(* *(..)) && @annotation(CacheEvict); /** - * Definition of pointcut from super aspect - matched join points - * will have Spring cache management applied. + * Definition of pointcut from super aspect - matched join points will have Spring + * cache management applied. */ protected pointcut cacheMethodExecution(Object cachedObject) : - (executionOfAnyPublicMethodInAtCacheableType() || executionOfAnyPublicMethodInAtCacheEvictType() - || executionOfCacheableMethod() || executionOfCacheEvictMethod()) - && this(cachedObject); + (executionOfAnyPublicMethodInAtCacheableType() + || executionOfAnyPublicMethodInAtCacheEvictType() + || executionOfCacheableMethod() + || executionOfCacheEvictMethod()) + && this(cachedObject); }