Class MoreMatchers
java.lang.Object
tech.picnic.errorprone.bugpatterns.util.MoreMatchers
A collection of general-purpose
Matchers.
These methods are additions to the ones found in Matchers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends AnnotationTree>
com.google.errorprone.matchers.Matcher<T>hasMetaAnnotation(String annotationType) Returns aMatcherthat determines whether a givenAnnotationTreehas a meta-annotation of the specified type.
-
Method Details
-
hasMetaAnnotation
public static <T extends AnnotationTree> com.google.errorprone.matchers.Matcher<T> hasMetaAnnotation(String annotationType) Returns aMatcherthat determines whether a givenAnnotationTreehas 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
Matcherthat matches trees with the specified meta-annotation.
-