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

Avoid generating common methods for each groovy class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-rc-1
    • None
    • None

    Description

      invokeMethod, getProperty and setProperty are common for groovy classes, but they have to be generated for each groovy class as GroovyObject is an interface and can not have default implementation before Java8.

      Groovy 3 is based on Java8, so we can leverage the power of default method in interface to avoid generating common methods. As a result, the size of groovy class files will be reduced(about 580 bytes reduced), and the time costed on generating and loading class files will be reduced too.

      Attachments

        Issue Links

          Activity

            People

              daniel_sun Daniel Sun
              daniel_sun Daniel Sun
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m