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

Removing @Property Syntax

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-5
    • 1.0-JSR-6
    • None
    • None

    Description

      Following discussion on the list, the best option forward for an improvement to the @Property syntax was agreed to be John's suggestion, now is the time to action it before the release candidate:

      def x
      

      is equivalent to

      private x
      
      public getx() {...
      
      public setx(x) {....
      

      and

      final x = 1
      

      is equivalent to

      private final x = 1
      
      public getx() {...
      

      and

      public x, protected x and private x define public, private and
      protected fields

      If users need to define protected or private accessor functions they
      have to do so explicitly.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            graemerocher Graeme Rocher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: