code: @Nullable
    @Deprecated
    public static <T extends Annotation> T getAnnotation(Tree tree, Class<T> annotationClass) {
      Symbol sym = getSymbol(tree);
      return sym == null ? null : getAnnotation(sym, annotationClass);
    }
docs: Retrieves an annotation, considering annotation inheritance.
  
  @deprecated If {@code annotationClass} contains a member that is a {@code Class} or an array of
  them, attempting to access that member from the Error Prone checker code will result in a
  runtime exception. Instead, operate on {@code sym.getAnnotationMirrors()} to
  meta-syntactically inspect the annotation.