List of usage examples for org.springframework.cache.annotation CacheAnnotationParser parseCacheAnnotations
@Nullable Collection<CacheOperation> parseCacheAnnotations(Method method);
From source file:grails.plugin.cache.GrailsAnnotationCacheOperationSource.java
/** * Determine the cache operation(s) for the given method or class. * <p>This implementation delegates to configured * {@link CacheAnnotationParser}s for parsing known annotations into * Spring's metadata attribute class.//from w w w . j av a2 s. c om * <p>Can be overridden to support custom annotations that carry * caching metadata. * @param ae the annotated method or class * @return the configured caching operations, or {@code null} if none found */ protected Collection<CacheOperation> determineCacheOperations(AnnotatedElement ae) { Collection<CacheOperation> ops = null; for (CacheAnnotationParser annotationParser : annotationParsers) { Collection<CacheOperation> annOps = annotationParser.parseCacheAnnotations(ae); if (annOps != null) { if (ops == null) { ops = new ArrayList<CacheOperation>(); } ops.addAll(annOps); } } return ops; }