public static Stream<PsiAnnotation> findMetaAnnotationsInHierarchy(
    @NotNull PsiModifierListOwner listOwner,
    @NotNull Collection<String> annotations
  ) {
    Stream<PsiAnnotation> stream = findMetaAnnotations(listOwner, annotations);
    if (listOwner instanceof PsiClass) {
      for (PsiClass superClass : ((PsiClass)listOwner).getSupers()) {
        stream = Stream.concat(stream, findMetaAnnotationsInHierarchy(superClass, annotations));
      }
    }
    else if (listOwner instanceof PsiMethod) {
      for (PsiMethod method : ((PsiMethod)listOwner).findSuperMethods()) {
        stream = Stream.concat(stream, findMetaAnnotationsInHierarchy(method, annotations));
      }
    }
    return stream;
  }
public static Stream<PsiAnnotation> findMetaAnnotationsInHierarchy(
    @NotNull PsiModifierListOwner listOwner,
    @NotNull Collection<String> annotations
  )