public static Object emulateInvokeDynamic ( ReloadableType rtype , Class < ? > executorClass , Handle handle , Object [ ] bsmArgs , Object lookup , String indyNameAndDescriptor , Object [ ] indyParams ) { try { CallSite callsite = callLambdaMetaFactory ( rtype , bsmArgs , lookup , indyNameAndDescriptor , executorClass ) ; return callsite . dynamicInvoker ( ) . invokeWithArguments ( indyParams ) ; } catch ( Throwable t ) { throw new RuntimeException ( t ) ; } }
Programmatic emulation of INVOKEDYNAMIC so initialize the callsite via use of the bootstrap method then invoke the result .