Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2503 MOP 2.0 design inflluencing issues
  3. GROOVY-1646

Inherited method establishing logic needs to be MetaClass aware

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • groovy-jdk
    • None

    Description

      Currently when I add methods to a super class with ExpandoMetaClass the child class is not able to see these new methods. This is because the logic that establishes the super methods is all private and only takes methods from the java.lang.Class instances and DGM:

        private void fillMethodIndex() {
            ...
      
             inheritMethods(superClasses,classMethodIndex);
      

      Instead inheritMethods needs to retrieve the MetaClass of the parent class, initialize it if it isn't already initialized and then get all the MetaMethod instances from it that don't already exist

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              graemerocher Graeme Rocher
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: