CONSTANT_Dynamic resolution occurs by invoking a bootstrap method via 'invokeWithArguments', passing an array of arguments. The first three arguments are invocation metadata���a Lookup, a name, and a Class. If the arguments can't be cast to the bootstrap method's input types, the invocation fails.
To facilitate more flexible bootstrap method calling conventions in the future, we'd like to require that the first parameter has type MethodHandles.Lookup. If a bootstrap does not conform, an error will occur, with the possibility of using a different calling convention in the future.
This change rejects bootstraps like the following, which can currently be invoked without error:
static Foo bootstrap(Object lookup, String name, Class<?> type)
static Foo bootstrap(Object... args)
For compatibility, no change is proposed to the resolution behavior for invokedynamic bootstraps.