boolean (@NotNull PsiClass psiClass) { return StreamEx.of(psiClass.getExtendsListTypes()) .append(psiClass.getImplementsListTypes()) .map(r -> r.resolve()) .anyMatch(parent -> parent != null && parent.hasModifierProperty(PsiModifier.SEALED)); }