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

Add sender of method calls as a parameter to the methods of MetaClass

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • groovy-runtime
    • None

    Description

      MetaClass extends the MOP interface with methods which have a senderClass as their first parameter. Unfortunately, the param does not refer to the sender of the original method call but is in most cases identical to the receiver's class.

      Knowing the sender of a method call would allow interesting reflective program structures like subjective programming with a three-dimensional message dispatch. A method can not only be overwritten by the receiver with polymorphism but also by the sender. Refer to http://citeseer.ist.psu.edu/smith96simple.html for more details.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              arvid Arvid Heise
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: