PsiType (@NotNull final PsiNameValuePair pair) { final PsiReference reference = pair.getReference(); if (reference != null) { final PsiElement method = reference.resolve(); if (method instanceof PsiMethod) { return ((PsiMethod)method).getReturnType(); } } return null; }