Class MoreMatchers

java.lang.Object
tech.picnic.errorprone.bugpatterns.util.MoreMatchers

public final class MoreMatchers extends Object
A collection of general-purpose Matchers.

These methods are additions to the ones found in Matchers.

  • Method Details

    • hasMetaAnnotation

      public static <T extends AnnotationTree> com.google.errorprone.matchers.Matcher<T> hasMetaAnnotation(String annotationType)
      Returns a Matcher that determines whether a given AnnotationTree has a meta-annotation of the specified type.
      Type Parameters:
      T - The type of tree to match against.
      Parameters:
      annotationType - The binary type name of the annotation (e.g. "org.jspecify.annotations.Nullable", or "some.package.OuterClassName$InnerClassName")
      Returns:
      A Matcher that matches trees with the specified meta-annotation.