Class SpringCacheAnnotationParser
java.lang.Object
org.springframework.cache.annotation.SpringCacheAnnotationParser
- All Implemented Interfaces:
- Serializable,- CacheAnnotationParser
public class SpringCacheAnnotationParser
extends Object
implements CacheAnnotationParser, Serializable
Strategy implementation for parsing Spring's 
Caching, Cacheable,
 CacheEvict, and CachePut annotations.- Since:
- 3.1
- Author:
- Costin Leau, Juergen Hoeller, Chris Beams, Phillip Webb, Stephane Nicoll, Sam Brannen
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleaninthashCode()booleanisCandidateClass(Class<?> targetClass) Determine whether the given class is a candidate for cache operations in the annotation format of thisCacheAnnotationParser.parseCacheAnnotations(Class<?> type) Parse the cache definition for the given class, based on an annotation type understood by this parser.parseCacheAnnotations(Method method) Parse the cache definition for the given method, based on an annotation type understood by this parser.
- 
Constructor Details- 
SpringCacheAnnotationParserpublic SpringCacheAnnotationParser()
 
- 
- 
Method Details- 
isCandidateClassDescription copied from interface:CacheAnnotationParserDetermine whether the given class is a candidate for cache operations in the annotation format of thisCacheAnnotationParser.If this method returns false, the methods on the given class will not get traversed for#parseCacheAnnotationsintrospection. Returningfalseis therefore an optimization for non-affected classes, whereastruesimply means that the class needs to get fully introspected for each method on the given class individually.- Specified by:
- isCandidateClassin interface- CacheAnnotationParser
- Parameters:
- targetClass- the class to introspect
- Returns:
- falseif the class is known to have no cache operation annotations at class or method level;- trueotherwise. The default implementation returns- true, leading to regular introspection.
 
- 
parseCacheAnnotationsDescription copied from interface:CacheAnnotationParserParse the cache definition for the given class, based on an annotation type understood by this parser.This essentially parses a known cache annotation into Spring's metadata attribute class. Returns nullif the class is not cacheable.- Specified by:
- parseCacheAnnotationsin interface- CacheAnnotationParser
- Parameters:
- type- the annotated class
- Returns:
- the configured caching operation, or nullif none found
- See Also:
 
- 
parseCacheAnnotationsDescription copied from interface:CacheAnnotationParserParse the cache definition for the given method, based on an annotation type understood by this parser.This essentially parses a known cache annotation into Spring's metadata attribute class. Returns nullif the method is not cacheable.- Specified by:
- parseCacheAnnotationsin interface- CacheAnnotationParser
- Parameters:
- method- the annotated method
- Returns:
- the configured caching operation, or nullif none found
- See Also:
 
- 
equals
- 
hashCode
 
-