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

Chaining support

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Compiler, xforms

    Description

      I suggest you to improve chaining support (like jquery).

      Currently you should return this:

      class CurrentClazz  {
      
      CurrentClazz chainMethod() {
        //abc
        return this
      }
      
      }
      

      We can add special keyword for return type ('this' for example). With this keyword groovy will explicitly return this object:

      class CurrentClazz  {
      
      this chainMethod() {
        //abc without return statement
      }
      
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            fedotxxl fedotxxl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: