Class AnnotationSizeOfFilter

java.lang.Object
org.ehcache.sizeof.filters.AnnotationSizeOfFilter
All Implemented Interfaces:
SizeOfFilter

public final class AnnotationSizeOfFilter extends Object implements SizeOfFilter
  • Field Details

    • IGNORE_SIZE_OF_VM_ARGUMENT

      private static final String IGNORE_SIZE_OF_VM_ARGUMENT
    • LOG

      private static final org.slf4j.Logger LOG
    • IGNORE_SIZE_OF_DEFAULT_REGEXP

      private static final String IGNORE_SIZE_OF_DEFAULT_REGEXP
      See Also:
    • IGNORE_SIZE_OF_PATTERN

      private static final Pattern IGNORE_SIZE_OF_PATTERN
  • Constructor Details

    • AnnotationSizeOfFilter

      public AnnotationSizeOfFilter()
  • Method Details

    • filterFields

      public Collection<Field> filterFields(Class<?> klazz, Collection<Field> fields)
      Returns the fields to walk and measure for a type
      Specified by:
      filterFields in interface SizeOfFilter
      Parameters:
      klazz - the type
      fields - the fields already "qualified"
      Returns:
      the filtered Set
    • filterClass

      public boolean filterClass(Class<?> klazz)
      Checks whether the type needs to be filtered
      Specified by:
      filterClass in interface SizeOfFilter
      Parameters:
      klazz - the type
      Returns:
      true, if to be filtered out
    • isAnnotationPresentOrInherited

      private boolean isAnnotationPresentOrInherited(Class<?> instanceKlazz)
    • validateCustomAnnotationPattern

      private boolean validateCustomAnnotationPattern(String canonicalName, Pattern matchingAnnotationPattern)
    • getAnnotationOn

      private <T extends Annotation> T getAnnotationOn(AnnotatedElement element, Class<T> referenceAnnotation, Pattern matchingAnnotationPattern)