boolean (@Nullable PsiType type, @NotNull @NonNls final String baseClassName) { if (type instanceof PsiClassType) { PsiUtil.ensureValidType(type); return isInheritor(((PsiClassType)type).resolve(), baseClassName); } if (type instanceof PsiIntersectionType) { for (PsiType conjunct : ((PsiIntersectionType)type).getConjuncts()) { if (isInheritor(conjunct, baseClassName)) return true; } } return false; }