public static <T extends Tree> Matcher<T> hasAnnotation(final String annotationClass) {
    return new Matcher<T>() {
      @Override
      public boolean matches(T tree, VisitorState state) {
        return ASTHelpers.hasAnnotation(ASTHelpers.getDeclaredSymbol(tree), annotationClass, state);
      }
    };
  }
public static < T extends Tree > Matcher < T > hasAnnotation ( final String annotationClass ) { return new Matcher < T > ( ) { @ Override public boolean matches ( T tree , VisitorState state ) { return ASTHelpers . hasAnnotation ( ASTHelpers . getDeclaredSymbol ( tree ) , annotationClass , state ) ; } } ; }
Determines whether an expression has an annotation of the given type. This includes annotations
inherited from superclasses due to @Inherited.

@param annotationClass the binary class name of the annotation (e.g.
"javax.annotation.Nullable", or "some.package.OuterClassName$InnerClassName")