On Wed, 26 Jan 2022 00:06:25 GMT, liach <d...@openjdk.java.net> wrote:
> 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. Yes, that's one option. Such library should take a Lookup parameter to find the method handle for the default method as in the previous `MethodHandleProxies` implementation. Alternatively, the module of the target interface will need to be open to the library's module for deep reflection and the library can use `MethodHandles::privateLookupIn` to lookup the default method then. ------------- PR: https://git.openjdk.java.net/jdk/pull/7185