boolean () { final PsiExpression qualifierExpression = ((PsiReferenceExpression)myPlace).getQualifierExpression(); if (qualifierExpression instanceof PsiMethodCallExpression) { final JavaResolveResult resolveResult = ((PsiMethodCallExpression)qualifierExpression).resolveMethodGenerics(); final PsiElement element = resolveResult.getElement(); if (element instanceof PsiMethod) { final PsiType returnType = ((PsiMethod)element).getReturnType(); final PsiType substitutedReturnType = resolveResult.getSubstitutor().substitute(returnType); if (substitutedReturnType instanceof PsiCapturedWildcardType || substitutedReturnType instanceof PsiWildcardType) { return true; } } } return false; }