@Override
    public void visitClass(@NotNull PsiClass aClass) {
      // no call to super, so it doesn't drill down
      final PsiReferenceList implementsList = aClass.getImplementsList();
      if (implementsList == null) {
        return;
      }
      final PsiJavaCodeReferenceElement[] references =
        implementsList.getReferenceElements();
      for (final PsiJavaCodeReferenceElement reference : references) {
        final PsiElement target = reference.resolve();
        if (!(target instanceof PsiClass targetClass)) {
          return;
        }
        if (targetClass.isInterface() && interfaceContainsOnlyConstants(targetClass, new HashSet<>())) {
          registerError(reference);
        }
      }
    }
@Override
    public void visitClass(@NotNull PsiClass aClass)