/** * Compute and cache information for this adapter, so that it can call out to targets of the * erasure-family of the given erased type. */ /*non-public*/ InvokeGeneric(MethodType erasedCallerType) throws ReflectiveOperationException { assert (erasedCallerType.equals(erasedCallerType.erase())); this.erasedCallerType = erasedCallerType; this.initialInvoker = makeInitialInvoker(); assert initialInvoker .type() .equals(erasedCallerType.insertParameterTypes(0, MethodType.class, MethodHandle.class)) : initialInvoker.type(); }
private MethodHandle makePostDispatchInvoker() { // Take (MH'; MT, MH; A...) and run MH'(MT, MH; A...). MethodType invokerType = erasedCallerType.insertParameterTypes(0, EXTRA_ARGS); return invokerType.invokers().exactInvoker(); }