@Override
    public void visitClass(@NotNull PsiClass aClass) {
      // no call to super, so it doesn't drill down into inner classes
      final String className = aClass.getName();
      if (className == null) {
        return;
      }
      final Set<PsiClass> alreadyVisited = new HashSet<>(8);
      final PsiClass[] supers = aClass.getSupers();
      for (final PsiClass aSuper : supers) {
        if (hasMatchingName(aSuper, className, alreadyVisited)) {
          registerClassError(aClass);
        }
      }
    }
@Override
    public void visitClass(@NotNull PsiClass aClass)