Boolean (@NotNull PsiClassType classType) { for (PsiType psiType : classType.getParameters()) { if (psiType != null) { final Boolean typeParamFound = psiType.accept(this); if (typeParamFound != null && typeParamFound) return true; } } final PsiClass aClass = PsiUtil.resolveClassInType(classType); return aClass instanceof PsiTypeParameter && ((PsiTypeParameter)aClass).getOwner() == method; }