public final class AnnotationSizeOfFilter extends java.lang.Object implements SizeOfFilter
IgnoreSizeOf
annotationModifier and Type | Field and Description |
---|---|
private static java.lang.String |
IGNORE_SIZE_OF_DEFAULT_REGEXP |
private static java.util.regex.Pattern |
IGNORE_SIZE_OF_PATTERN |
private static java.lang.String |
IGNORE_SIZE_OF_VM_ARGUMENT |
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
AnnotationSizeOfFilter() |
Modifier and Type | Method and Description |
---|---|
boolean |
filterClass(java.lang.Class<?> klazz)
Checks whether the type needs to be filtered
|
java.util.Collection<java.lang.reflect.Field> |
filterFields(java.lang.Class<?> klazz,
java.util.Collection<java.lang.reflect.Field> fields)
Returns the fields to walk and measure for a type
|
private <T extends java.lang.annotation.Annotation> |
getAnnotationOn(java.lang.reflect.AnnotatedElement element,
java.lang.Class<T> referenceAnnotation,
java.util.regex.Pattern matchingAnnotationPattern) |
private boolean |
isAnnotationPresentOrInherited(java.lang.Class<?> instanceKlazz) |
private boolean |
validateCustomAnnotationPattern(java.lang.String canonicalName,
java.util.regex.Pattern matchingAnnotationPattern) |
private static final java.lang.String IGNORE_SIZE_OF_VM_ARGUMENT
private static final org.slf4j.Logger LOG
private static final java.lang.String IGNORE_SIZE_OF_DEFAULT_REGEXP
private static final java.util.regex.Pattern IGNORE_SIZE_OF_PATTERN
public java.util.Collection<java.lang.reflect.Field> filterFields(java.lang.Class<?> klazz, java.util.Collection<java.lang.reflect.Field> fields)
filterFields
in interface SizeOfFilter
klazz
- the typefields
- the fields already "qualified"public boolean filterClass(java.lang.Class<?> klazz)
filterClass
in interface SizeOfFilter
klazz
- the typefalse
, if to be filtered outprivate boolean isAnnotationPresentOrInherited(java.lang.Class<?> instanceKlazz)
private boolean validateCustomAnnotationPattern(java.lang.String canonicalName, java.util.regex.Pattern matchingAnnotationPattern)
private <T extends java.lang.annotation.Annotation> T getAnnotationOn(java.lang.reflect.AnnotatedElement element, java.lang.Class<T> referenceAnnotation, java.util.regex.Pattern matchingAnnotationPattern)