< prev index next >
src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java
Print this page
*** 52,62 ****
import java.util.stream.Stream;
import static java.lang.invoke.LambdaForm.*;
import static java.lang.invoke.MethodHandleStatics.*;
import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
- import static java.lang.invoke.MethodHandleNatives.Constants.HIDDEN_CLASS;
import static jdk.internal.org.objectweb.asm.Opcodes.*;
/**
* Trusted implementation code for MethodHandle.
* @author jrose
--- 52,61 ----
*** 1171,1181 ****
if (targetClass.isHiddenClass()) {
// use the original class name
name = name.replace('/', '_');
}
Class<?> invokerClass = new Lookup(targetClass)
! .makeHiddenClassDefiner(name, INJECTED_INVOKER_TEMPLATE, 0).defineClass(true);
assert checkInjectedInvoker(targetClass, invokerClass);
return IMPL_LOOKUP.findStatic(invokerClass, "invoke_V", INVOKER_MT);
} catch (ReflectiveOperationException ex) {
throw uncaughtException(ex);
}
--- 1170,1181 ----
if (targetClass.isHiddenClass()) {
// use the original class name
name = name.replace('/', '_');
}
Class<?> invokerClass = new Lookup(targetClass)
! .makeHiddenClassDefiner(name, INJECTED_INVOKER_TEMPLATE)
! .defineClass(true);
assert checkInjectedInvoker(targetClass, invokerClass);
return IMPL_LOOKUP.findStatic(invokerClass, "invoke_V", INVOKER_MT);
} catch (ReflectiveOperationException ex) {
throw uncaughtException(ex);
}
< prev index next >