boolean (final PsiClass targetClass) { PsiClass superClass = targetClass.getSuperClass(); while(superClass != null) { if (myTargetClasses.contains(superClass)) return true; superClass = superClass.getSuperClass(); } return false; }