Is it possible to find where in a class hierarchy the method retrieved by class_getInstanceMethod
is coming from? For example, say Class A implements myMethod. Now say i've subclassed Class A in Class A1. If I call class_getInstanceMethod(ClassA1, myMethod)
, is it possible to tell whether the resulting method has been overridden in ClassA1 or comes directly from A1?
I suppose it would be possible to compare the memory addresses of the IMPs if you had access to both ClassA and ClassA1, but I don't have direct access to A.