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

Convention for read-only properties

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • syntax
    • None

    Description

      Now that Groovy 1.7 enforces field finality, I am missing having a shortcut for readonly fields.

      It would be nice to have something like:

      class T {
          @Readonly thing
      }
      

      Which would surpress the generation of the setter that Groovy would ordinarily create.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ldaley Luke Daley
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: