Create callback

Which 1s? Unless we’re also storing the array to use it later, there’s ZERO benefit! :roll_eyes:

Should we create an Object array for Method::invoke() as well? :face_with_hand_over_mouth:

method_1.invoke(this, "truc", count); :arrow_right:
method_1.invoke(this, new Object[] { "truc", count });

Both Class::getMethod() & Method::invoke() got variadic args.

But you’re advocating an array for: Class::getMethod(): :thinking:
method_1 = select_callback("my_method_1", this, new Class[] {String.class, int.class} );

And not for: Method::invoke()? :crazy_face:
method_1.invoke(this, "truc", count);

Yea, for the ultra rare cases indeed. But it’s none of our cases here! :flushed: