Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 46CD9200BB7 for ; Wed, 26 Oct 2016 01:35:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 45628160AFA; Tue, 25 Oct 2016 23:35:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8CCE4160AD8 for ; Wed, 26 Oct 2016 01:34:59 +0200 (CEST) Received: (qmail 5660 invoked by uid 500); 25 Oct 2016 23:34:58 -0000 Mailing-List: contact dev-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list dev@groovy.apache.org Received: (qmail 5635 invoked by uid 99); 25 Oct 2016 23:34:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2016 23:34:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E813F1806C2 for ; Tue, 25 Oct 2016 23:34:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.793 X-Spam-Level: * X-Spam-Status: No, score=1.793 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=asert-com-au.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id e6t1KUcr-2Xv for ; Tue, 25 Oct 2016 23:34:56 +0000 (UTC) Received: from mail-oi0-f53.google.com (mail-oi0-f53.google.com [209.85.218.53]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B15265F4E7 for ; Tue, 25 Oct 2016 23:34:55 +0000 (UTC) Received: by mail-oi0-f53.google.com with SMTP id y2so126688079oie.0 for ; Tue, 25 Oct 2016 16:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asert-com-au.20150623.gappssmtp.com; s=20150623; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to; bh=sRz/ziiXRtL3Mnt9cyC/VQhEV1Nug3zz0wha0wWtzdI=; b=e0mIm6SjnAdDP5BWtBwyfXz420CwxUuAnMfv6gcn3CTpwpB6L52e5TfpNg0INUOmq5 B77zLATNX0S4JapzyvtaBQxVXLf/pVLKKLIX7zeBWEYOCoaNbzckbZTycJu8N+AU/Z2V q77XlPozQ72fmOjGeFzaz59e++TRE17g6FsRyEyFgcnCRfPUVfGS4XZq2dCu14YMO9Ws G0AR9kWxZpqC/bqPF119NcrKnLDvSQ1tb2zaCXBMgel+xhTtUwM4rSMtFzfTRifgDCfk POd3q9AL2CP7ZImf/G2fbXxYTZkMXm58QhbPxqqMt7xaYo4Fh5eAKQYMKxT2ISNZJsbn GpQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to; bh=sRz/ziiXRtL3Mnt9cyC/VQhEV1Nug3zz0wha0wWtzdI=; b=lVpyVFypfmcxM196nLno/m64SdAAiESgGhZALYwmRiFmr2Sa2c/mvQUogOLZtB4lsj U6G7Z6VnNdcstrAIFwJKf5faw7VFow+48v4La259ztnmWxzADD9bOKwDXAvRv3d6DzFl zw1EY51/dlpFZNjjeQdVk3Qw3yg4a+rDp/xDB2LyCdOkA8MZh5SOfgFU3yjBs8A56br2 m889e9Xgtr5TE5W29JVt9KJD+x8LRiZh7npb4jiKfDSc4qJCKhiWnWxPXo6xtqjRxiJt H3w4s74MWvVtax4KKaXJTrgqOXumDu9Zpkeo5Or2N+sm+ixPfKZSYUebTIU/J+Br66Hu URSA== X-Gm-Message-State: ABUngve+QKy0xdqtZtRG+eH5zT/A2bbUTGNO2mznwc53jyz2Ygz//DiDQF+EFKs/BvsN7ta7E0fUtZtszKeGsw== X-Received: by 10.36.111.143 with SMTP id x137mr3635222itb.110.1477438490350; Tue, 25 Oct 2016 16:34:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.46.158 with HTTP; Tue, 25 Oct 2016 16:34:49 -0700 (PDT) Reply-To: paulk@asert.com.au In-Reply-To: <580FC0B6.7000100@gmx.org> References: <1477412724016-5736296.post@n5.nabble.com> <580FC0B6.7000100@gmx.org> From: Paul King Date: Wed, 26 Oct 2016 09:34:49 +1000 Message-ID: Subject: Re: Method reference for Groovy 3 To: dev@groovy.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Tue, 25 Oct 2016 23:35:00 -0000 nice! On Wed, Oct 26, 2016 at 6:29 AM, Jochen Theodorou wrote: > great stuff > > > On 25.10.2016 18:25, Daniel.Sun wrote: >> >> Hi all, >> >> The brand new parser can support method reference and constructor >> reference now. The implementation of backend is based on the discussion of >> GROOVY-7772 . >> >> Here are some example code of method reference for Groovy: >> >> import java.util.stream.Collectors >> assert ['1', '2', '3'] == [1, 2, >> 3].stream().map(Integer::toString).collect(Collectors.toList()) >> assert ['A', 'B', 'C'] == ['a', 'b', >> 'c'].stream().map(String::toUpperCase).collect(Collectors.toList()) >> assert [new String[1], new String[2], new String[3]] == [1, 2, >> 3].stream().map(String[]::new).collect(Collectors.toList()) >> >> ( Complete example code can be found at: >> >> https://github.com/danielsun1106/groovy-parser/blob/master/src/test/resources/core/MethodReference_01x.groovy >> >> >> ) >> >> At last, I want to thank *Jochen Theodorou* who explained the >> whole >> discussion of GROOVY-7772 in detail for me. >> >> *PS:* if you want to give it a try, follow the step: >> $ git clone https://github.com/danielsun1106/groovy-parser.git >> $ cd groovy-parser >> $ ./gradlew groovyConsole >> >> Cheers, >> Daniel.Sun >> >> >> >> -- >> View this message in context: >> http://groovy.329449.n5.nabble.com/Method-reference-for-Groovy-3-tp5736296.html >> Sent from the Groovy Dev mailing list archive at Nabble.com. >> >