Few questions about invokeDynamic
Rémi Forax
forax at univ-mlv.fr
Mon Nov 8 00:34:56 PST 2010
Le 08/11/2010 07:43, John Rose a écrit :
> 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, You mean, doing a Lookup.findVirtual on MethodHandle.invokeGeneric.
Ivan, you can also consider MethodHandles.spreadArguments().
> -- John
Rémi
More information about the mlvm-dev
mailing list