Boolean (@NotNull PsiClassType classType) { PsiClassType.ClassResolveResult resolveResult = classType.resolveGenerics(); final PsiClass psiClass = resolveResult.getElement(); if (psiClass == null) { return true; } PsiSubstitutor substitutor = resolveResult.getSubstitutor(); for (PsiTypeParameter param : PsiUtil.typeParametersIterable(psiClass)) { PsiType psiType = substitutor.substitute(param); if (psiType != null && psiType.accept(this)) { return true; } } return super.visitClassType(classType); }