Package org.ehcache.sizeof.filters
Class AnnotationSizeOfFilter
java.lang.Object
org.ehcache.sizeof.filters.AnnotationSizeOfFilter
- All Implemented Interfaces:
SizeOfFilter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
filterClass
(Class<?> klazz) Checks whether the type needs to be filteredfilterFields
(Class<?> klazz, Collection<Field> fields) Returns the fields to walk and measure for a typeprivate <T extends Annotation>
TgetAnnotationOn
(AnnotatedElement element, Class<T> referenceAnnotation, Pattern matchingAnnotationPattern) private boolean
isAnnotationPresentOrInherited
(Class<?> instanceKlazz) private boolean
validateCustomAnnotationPattern
(String canonicalName, Pattern matchingAnnotationPattern)
-
Field Details
-
IGNORE_SIZE_OF_VM_ARGUMENT
-
LOG
private static final org.slf4j.Logger LOG -
IGNORE_SIZE_OF_DEFAULT_REGEXP
- See Also:
-
IGNORE_SIZE_OF_PATTERN
-
-
Constructor Details
-
AnnotationSizeOfFilter
public AnnotationSizeOfFilter()
-
-
Method Details
-
filterFields
Returns the fields to walk and measure for a type- Specified by:
filterFields
in interfaceSizeOfFilter
- Parameters:
klazz
- the typefields
- the fields already "qualified"- Returns:
- the filtered Set
-
filterClass
Checks whether the type needs to be filtered- Specified by:
filterClass
in interfaceSizeOfFilter
- Parameters:
klazz
- the type- Returns:
- true, if to be filtered out
-
isAnnotationPresentOrInherited
-
validateCustomAnnotationPattern
-
getAnnotationOn
private <T extends Annotation> T getAnnotationOn(AnnotatedElement element, Class<T> referenceAnnotation, Pattern matchingAnnotationPattern)
-