Java getMethod with subclass parameter
It’s a bit longer than what you started with, but this does what you asked for… and a little more besides – for example, callMethod(receiver, “voidMethod”) where voidMethod takes no arguments also works. static void callMethod(Object receiver, String methodName, Object… params) { if (receiver == null || methodName == null) { return; } Class<?> cls … Read more