If I have a class that implements an interface with a default method, then the method is not found. This is at least in part because in JType_ProcessClassMethods the methods array is fetched with JPy_Class_GetDeclaredMethods_MID instead of JPy_Class_GetMethods_MID for non-interface types.
If the method is not defaulted, this works fine because the JOverloadedMethod_FindMethod call will visit the super class when invoking a method, but it does not visit the interfaces.
If I swap the call to getDeclaredMethods for a getMethods call, then the interfaces are found; but the behavior about visiting superclasses is going to change; because the method would be found in the wrapped class itself instead of the superclass.
I'd like to fix this, but need to understand the design intent behind visiting the super class hierarchy instead of allowing the getMethods call to find the methods; because to be consistent with the super class logic I need to visit the interfaces, after exhausting the rest of the method hierarchy.
If I have a class that implements an interface with a default method, then the method is not found. This is at least in part because in JType_ProcessClassMethods the methods array is fetched with JPy_Class_GetDeclaredMethods_MID instead of JPy_Class_GetMethods_MID for non-interface types.
If the method is not defaulted, this works fine because the JOverloadedMethod_FindMethod call will visit the super class when invoking a method, but it does not visit the interfaces.
If I swap the call to getDeclaredMethods for a getMethods call, then the interfaces are found; but the behavior about visiting superclasses is going to change; because the method would be found in the wrapped class itself instead of the superclass.
I'd like to fix this, but need to understand the design intent behind visiting the super class hierarchy instead of allowing the getMethods call to find the methods; because to be consistent with the super class logic I need to visit the interfaces, after exhausting the rest of the method hierarchy.