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

Runtime addition or overriding of methods

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0-beta-5
    • None
    • None

    Description

      I would really like the ability to easily override or add methods to classes not written by me and for which I don't have the source, at runtime. I'd even like the ability to do this for java.* classes if possible. And would it be possible to do this for classes declared final? Since Groovy uses a MetaClass for all objects, Java or Groovy, this seems like it should be easy.

      If this is a duplicate please close this one or add my comments to it, if it helps.

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            troyh Troy Heninger
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: