Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Abandoned
-
None
-
None
-
None
Description
The latest lombok version added a @Singluar annotation to their builder annotation:
"By annotating one of the parameters (if annotating a static method or constructor with @Builder) or fields (if annotating a class with @Builder) with the @Singular annotation, lombok will treat that builder node as a collection, and it generates 2 'adder' methods instead of a 'setter' method. One which adds a single element to the collection, and one which adds all elements of another collection to the collection."
source and further details: http://projectlombok.org/features/Builder.html
Maybe something like this would also be a nice enhancement for groovy.