groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <pa...@asert.com.au>
Subject Re: .with() variant that returns the original object
Date Thu, 10 Nov 2016 04:57:01 GMT
On Thu, Nov 10, 2016 at 6:47 AM, James Kleeh <james.kleeh@gmail.com> wrote:
> What about something like object.build { } ?

If you are solely using 'with' to build an object and 'with' by itself
isn't good enough Groovy also has the @Builder annotation. Probably
best we don't confuse normal 'with' with the @Builder transform which
already by default has a 'build' method:

http://groovy-lang.org/metaprogramming.html#xform-Builder

Mime
View raw message