creating proxies for interfaces with default methods

Jochen Theodorou blackdrag at gmx.org
Sat Jul 23 06:59:49 UTC 2016


On 23.07.2016 01:12, John Rose wrote:
> On May 27, 2016, at 1:16 AM, Alan Bateman <Alan.Bateman at oracle.com
> <mailto:Alan.Bateman at oracle.com>> wrote:
>>
>> I don't think it's possible to create a Lookup via support API with
>> just the PRIVATE lookup mode. It only seems to work because this code
>> seems to hack into the non-public constructor. I'm curious if you
>> invoke toString on this, with JDK 8 and with -esa, as I assume you
>> will get a similar assertion.
>
> The Lookup API does not have a "setAccessible" analog.
> Maybe it should; along the lines of Unsafe.privateLookup(Class).

would be nice, because then I would not have to depend on a hack

bye Jochen



More information about the jigsaw-dev mailing list