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

@ToString if used with includes='prop1,prop2' could allow the pseudo prop name 'super' as an alternative to using the includeSuper flag

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.5.0-alpha-1
    • xforms
    • None

    Description

      Basically, the following would be supported:

      import groovy.transform.*
      
      @ToString
      class Foo {
        String baz = 'baz'
      }
      
      @ToString(includes='super,num,blah', includeNames=true)
      class Bar extends Foo {
        String blah = 'blah'
        int num = 42
      }
      
      new Bar().toString() // => Bar(blah:blah, num:42, super:Foo(baz))
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: