private static boolean isMethodOrClassAnnotated(@NotNull PsiMethod method,
                                                  @NotNull Collection<String> annotations,
                                                  @NotNull Collection<String> denyAnnotations) {
    if (AnnotationUtil.findAnnotation(method, annotations, false) != null) return true;
    // @NonBlocking on method overrides @Blocking on class
    if (AnnotationUtil.findAnnotation(method, denyAnnotations, false) != null) return false;

    PsiClass containingClass = method.getContainingClass();
    return containingClass != null
           && AnnotationUtil.findAnnotation(containingClass, annotations, false) != null;
  }
private static boolean isMethodOrClassAnnotated(@NotNull PsiMethod method,
                                                  @NotNull Collection<String> annotations,
                                                  @NotNull Collection<String> denyAnnotations)