On Tue, 25 Jan 2022 22:01:22 GMT, Johannes Kuhn <jk...@openjdk.org> wrote:
> My question was for when a library wants to implement something similar to > `MethodHandleProxies.asInterfaceInstace`, and for example supports Interfaces > with more than a single abstract method. Currently, such a library would also > have to call `ReflectAccess.invokeDefault`, as the interface may not be > accessible by the `InvocationHandler` (as it could be the case with > `MethodHandleProxies.asInterfaceInstace` > > But this might be a discussion for an other time. Patch looks good. They will probably accept a `MethodHandles.Lookup` object to define a class for such a single-interface instance plus calling the default methods beyond the restrictions. ------------- PR: https://git.openjdk.java.net/jdk/pull/7185