6983726: Reimplement MethodHandleProxies.asInterfaceInstance

Co-authored-by: Mandy Chung <mchung@openjdk.org>
Reviewed-by: jvernee, mchung
This commit is contained in:
Chen Liang 2023-07-20 00:59:28 +00:00 committed by Mandy Chung
parent 71cac8ce47
commit 5d57b5c2f0
13 changed files with 1151 additions and 403 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -94,6 +94,10 @@ class ReflectAccess implements jdk.internal.access.JavaLangReflectAccess {
return ex.getSharedParameterTypes();
}
public Class<?>[] getExecutableSharedExceptionTypes(Executable ex) {
return ex.getSharedExceptionTypes();
}
//
// Copying routines, needed to quickly fabricate new Field,
// Method, and Constructor objects from templates
@ -127,9 +131,4 @@ class ReflectAccess implements jdk.internal.access.JavaLangReflectAccess {
{
return ctor.newInstanceWithCaller(args, true, caller);
}
public Object invokeDefault(Object proxy, Method method, Object[] args, Class<?> caller)
throws Throwable {
return Proxy.invokeDefault(proxy, method, args, caller);
}
}