How to invoke a MethodHandle with varargs
问题 I'm trying to replace a reflective invocation with a MethodHandle, but varargs seem to be impossible to deal with. My reflective invoker currently looks like this: public class Invoker { private final Method delegate; public Invoker(Method delegate) { this.delegate = delegate; } public Object execute(Object target, Object[] args) { return delegate.invoke(target, args); } } My current attempt at rewriting it looks like this (the interface the Invoker exposes has to stay the same): public class