boolean (@Nullable PsiType type, @NotNull Set<PsiTypeParameter> excluded) { if (!(type instanceof PsiClassType)) return false; PsiTypesUtil.TypeParameterSearcher searcher = new PsiTypesUtil.TypeParameterSearcher(); type.accept(searcher); for (PsiTypeParameter parameter : searcher.getTypeParameters()) { if (!excluded.contains(parameter) && !myDisappearedTypeParameters.contains(parameter)) { return true; } } return false; }