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

Update groovy docs for Category

    XMLWordPrintableJSON

Details

    • Documentation
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.5
    • 2.4.6
    • Documentation
    • None

    Description

      Category docs refer to @Mixin but they are deprecated
      http://docs.groovy-lang.org/latest/html/gapi/groovy/lang/Category.html

      I found that using traits is not possible. But it would be nice to be able to use them.

      Tried a workaround but didn't work

      trait Util {
          Number getTwice() { this * 2 }
          Number max(Number otherNumber) { Math.max(this, otherNumber) }
      }
      
      @groovy.lang.Category(Number)
      abstract class UtilCategory implements Util {
      }
      

      Attachments

        Activity

          People

            pascalschumacher Pascal Schumacher
            anshbansal Aseem Bansal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: