int (@NotNull final PsiClass psiClass, @NotNull final PsiClass containingClass) { ObjectIntMap<PsiClass> indices = CachedValuesManager.getCachedValue(containingClass, () -> { ObjectIntMap<PsiClass> map = new ObjectIntHashMap<>(); int index = 0; for (PsiClass aClass : SyntaxTraverser.psiTraverser().withRoot(containingClass).postOrderDfsTraversal().filter(PsiClass.class)) { if (aClass.getQualifiedName() == null) { map.put(aClass, ++index); } } return CachedValueProvider.Result.create(map, containingClass); }); return indices.get(psiClass); }