Boolean (@NotNull PsiClassType classType) { final PsiClassType.ClassResolveResult resolveResult = classType.resolveGenerics(); final PsiClass psiClass = resolveResult.getElement(); if (psiClass != null) { if (psiClass instanceof PsiTypeParameter && TypeConversionUtil.isFreshVariable((PsiTypeParameter)psiClass)) { return false; } if (!PsiUtil.isAccessible(psiClass, myExpression, null)) { return false; } for (PsiType psiType : resolveResult.getSubstitutor().getSubstitutionMap().values()) { final Boolean accepted = psiType != null ? psiType.accept(this) : null; if (accepted != null && !accepted.booleanValue()) { return false; } } } return true; }