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

@MapConstructor could provide a noArg flag

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0-beta-3
    • None
    • None

    Description

      This could provide a noArgs constructor which called the Map-based constructor with an empty Map, e.g.:

      @MapConstructor(noArg=true)
      class Foo { ... }
      

      would in addition to the Map-based constructor, also provide this:

      Foo() { this([:]) }
      

      This is currently part of what @Immutable provides.

      Attachments

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: