Class AnnotationFilter<E extends CtElement>

All Implemented Interfaces:

public class AnnotationFilter<E extends CtElement> extends TypeFilter<E>
This filter matches all the elements annotated with a given annotation type.
  • Constructor Details

    • AnnotationFilter

      public AnnotationFilter(Class<? extends Annotation> annotationType)
      Creates the filter.
      annotationType - the annotation type which is searched
    • AnnotationFilter

      public AnnotationFilter(Class<E> elementType, Class<? extends Annotation> annotationType)
      Creates a new annotation filter.
  • Method Details

    • matches

      public boolean matches(E element)
      Description copied from interface: Filter
      Tells if the given element matches.
      Specified by:
      matches in interface Filter<E extends CtElement>
      matches in class AbstractFilter<E extends CtElement>
      element - - the element to be checked for a match. Parameter element is never null if Query is used.