private static boolean isEmptyInterfaceWithFields(@NotNull PsiClass targetClass) {
    if (!targetClass.isInterface()) {
      return false;
    }
    final PsiReferenceList extendsList = targetClass.getExtendsList();
    if (extendsList != null && extendsList.getReferencedTypes().length > 0) {
      final List<PsiMethod> methods = new ArrayList<>(Arrays.asList(targetClass.getAllMethods()));
      final PsiClass objectClass =
        JavaPsiFacade.getInstance(targetClass.getProject()).findClass(CommonClassNames.JAVA_LANG_OBJECT, targetClass.getResolveScope());
      if (objectClass == null) return false;
      methods.removeAll(Arrays.asList(objectClass.getMethods()));
      if (!methods.isEmpty()) return false;
    }
    else if (targetClass.getMethods().length > 0) {
      return false;
    }
    return targetClass.getAllFields().length > 0;
  }
private static boolean isEmptyInterfaceWithFields(@NotNull PsiClass targetClass)