PsiMethodCallExpression (PsiMethodReferenceExpression methodRef) { PsiLambdaExpression lambdaExpression = LambdaRefactoringUtil.convertMethodReferenceToLambda(methodRef, true, true); List<PsiExpression> returnExpressions = LambdaUtil.getReturnExpressions(lambdaExpression); if (returnExpressions.size() != 1) return null; PsiExpression expression = returnExpressions.get(0); if (!(expression instanceof PsiMethodCallExpression)) return null; return (PsiMethodCallExpression)expression; }