code: public static <T extends Tree> Matcher<T> hasAnnotation(
        final Class<? extends Annotation> inputClass) {
      return new Matcher<T>() {
        @Override
        public boolean matches(T tree, VisitorState state) {
          return ASTHelpers.hasAnnotation(ASTHelpers.getDeclaredSymbol(tree), inputClass, state);
        }
      };
    }
docs: Determines whether an expression has an annotation of the given class. This includes
  annotations inherited from superclasses due to @Inherited.
  
  @param inputClass The class of the annotation to look for (e.g, Produces.class).