PsiType (@NotNull PsiField field, @NotNull PsiReferenceExpression referenceExpression) { PsiType rawType = field.getType(); return referenceExpression.advancedResolve(false).getSubstitutor().substitute(rawType); }