optional arguments for bootstrap methods
Helmut Eller
eller.helmut at gmail.com
Fri Oct 22 04:03:59 PDT 2010
* John Rose [2010-10-22 08:43] writes:
> MethodHandle myBSM(MethodHandles.Lookup look, String name, MethodType type);
> MethodHandle myBSM(MethodHandles.Lookup look, String name, MethodType type, Object arg);
> MethodHandle myBSM(MethodHandles.Lookup look, String name, MethodType type, Object... args);
>
> It is natural to ask why we are using varargs, when we could just
> specify that the extra static arguments could be passed positionally.
> The simple answer is positional arguments are of limited use, but a
> varargs array can be used to encode very rich and useful BSM
> arguments.
Why is the name a required and not an optional argument?
Helmut
More information about the mlvm-dev
mailing list