code: public static Stream<? extends AnnotationMirror> getAllAnnotations(Symbol symbol) {
      // for methods, we care about annotations on the return type, not on the method type itself
      Stream<? extends AnnotationMirror> typeUseAnnotations = getTypeUseAnnotations(symbol);
      return Stream.concat(symbol.getAnnotationMirrors().stream(), typeUseAnnotations);
    }
docs: NOTE: this method does not work for getting all annotations of parameters of methods from class
  files. For that case, use {@link #getAllAnnotationsForParameter(Symbol.MethodSymbol, int)}
  
  @param symbol the symbol
  @return all annotations on the symbol and on the type of the symbol