groovy
  1. groovy
  2. GROOVY-2503 MOP 2.0 design inflluencing issues
  3. GROOVY-1646

Inherited method establishing logic needs to be MetaClass aware

    Details

    • Type: Sub-task Sub-task
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: groovy-jdk
    • Labels:
      None
    • Number of attachments :
      0

      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

        Issue Links

          Activity

          Hide
          Alex Tkachman added a comment -

          This should go to 2.0

          Show
          Alex Tkachman added a comment - This should go to 2.0
          Hide
          Guillaume Laforge added a comment -

          Isn't it something you've been working on?

          Show
          Guillaume Laforge added a comment - Isn't it something you've been working on?

            People

            • Assignee:
              Unassigned
              Reporter:
              Graeme Rocher
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: