@Override
    public void visitClass(@NotNull PsiClass aClass) {
      if (aClass instanceof PsiAnonymousClass anonymousClass) {
        final String name = anonymousClass.getBaseClassReference().getReferenceName();
        if (!namedElements.containsKey(name)) {
          namedElements.put(name, aClass);
        }
      }
      else {
        handleNamedElement(aClass);
      }
    }
@Override
    public void visitClass(@NotNull PsiClass aClass)