< prev index next >

src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java

Print this page

        

*** 1166,1175 **** --- 1166,1182 ---- return restoreToType(bccInvoker.bindTo(vamh), mh, hostClass); } private static MethodHandle makeInjectedInvoker(Class<?> hostClass) { try { + /* ## TODO + * The invoker class defined to the same class loader as the lookup class + * but in an unnamed package so that the class bytes can be cached and + * reused for any @CSM. + * + * @CSM must be public and exported if called by any module. + */ Class<?> invokerClass = UNSAFE.defineAnonymousClass(hostClass, INJECTED_INVOKER_TEMPLATE, null); assert checkInjectedInvoker(hostClass, invokerClass); return IMPL_LOOKUP.findStatic(invokerClass, "invoke_V", INVOKER_MT); } catch (ReflectiveOperationException ex) { throw uncaughtException(ex);
*** 1796,1806 **** MethodType[] callSiteMethodTypes) { return GenerateJLIClassesHelper .generateInvokersHolderClassBytes(className, invokerMethodTypes, callSiteMethodTypes); } - }); } /** Result unboxing: ValueConversions.unbox() OR ValueConversions.identity() OR ValueConversions.ignore(). */ private static MethodHandle unboxResultHandle(Class<?> returnType) { --- 1803,1812 ----
< prev index next >