Few questions about invokeDynamic

John Rose john.r.rose at oracle.com
Sun Nov 7 22:43:51 PST 2010


On Nov 7, 2010, at 1:17 AM, assembling signals wrote:

> For the use case "calling a method whose signature is unknown prior to runtime"
> (such as some lib, loaded externally) :

That's what MethodHandles.genericInvoker is for.

You can also do this yourself by calling Lookup.findVirtual on MethodHandle.invokeExact.  That reflective mechanism will hand you a capability to invoke any signature, even if you didn't spin bytecodes.

-- John



More information about the mlvm-dev mailing list