void (final Set<PsiClass> supers, final PsiClass classToAdd) { for (Iterator<PsiClass> iterator = supers.iterator(); iterator.hasNext();) { PsiClass superClass = iterator.next(); if (InheritanceUtil.isInheritorOrSelf(superClass, classToAdd, true)) return; if (classToAdd.isInheritor(superClass, true)) iterator.remove(); } supers.add(classToAdd); }