I want to use
Class.getMethod(String name, Class... parameterTypes)
to find the method I need to invoke with the given parameters, but apparent
You could add some additional logic around your reflection call which tries converting your Integer.class
(or whatever) into the corresponding primitive class, and then repeatedly looking up the method until you get a match. If you have Apache Commons Lang, then the wrapperToPrimitive method will do this conversation for you, but writing it yourself is trivial.
getMethod
as usualNot elegant, and for methods with a lot of primitive parameters, it might even be slow.