Lookup objects and setAccessible

Remi Forax forax at univ-mlv.fr
Wed Jan 8 11:52:03 UTC 2020


see https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/lang/invoke/MethodHandles.html#privateLookupIn(java.lang.Class,java.lang.invoke.MethodHandles.Lookup)

Rémi

----- Mail original -----
> De: "Kasper Nielsen" <kasperni at gmail.com>
> À: "jigsaw-dev" <jigsaw-dev at openjdk.java.net>
> Envoyé: Mercredi 8 Janvier 2020 12:14:30
> Objet: Lookup objects and setAccessible

> Hi,
> 
> I'm trying to bridge some old code using java.lang.reflect and some new code
> that uses Lookup objects. And I'm wondering if there is some way to make
> a member accessible using a Lookup object? Or if open packages/modules via
> module-info.java + member.setAccessible(true) is the only way?
> 
> Thanks
>   Kasper


More information about the jigsaw-dev mailing list