Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7279

Enhance @Builder annotation with a @Singular annotation

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Abandoned
    • None
    • None
    • xforms
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pschumacher Pascal Schumacher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: