UExpression (PsiClass psiClass, String methodName) { final PsiMethod[] methods = psiClass.findMethodsByName(methodName, false); if (methods.length != 1) { return null; } return PsiUtil.getReturnedExpression(methods[0]); }