Java getMethod with subclass parameter
- by SelectricSimian
I'm writing a library that uses reflection to find and call methods dynamically. Given just an object, a method name, and a parameter list, I need to call the given method as though the method call were explicitly written in the code.
I've been using the following approach, which works in most cases:
static void callMethod(Object receiver,…