void (@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); } }