private static boolean isUndeclaredUsage(PsiJavaModule module, @NotNull PsiClass serviceClass) {
    for (PsiUsesStatement usesStatement : module.getUses()) {
      PsiClassType usedClass = usesStatement.getClassType();
      if (usedClass != null && serviceClass.equals(usedClass.resolve())) {
        return false;
      }
    }
    return true;
  }
private static boolean isUndeclaredUsage(PsiJavaModule module, @NotNull PsiClass serviceClass)