예제 #1
0
 /**
  * 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();
 }
예제 #2
0
 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();
 }