setAccessible() alternative with Jigsaw - feedback on Lookup
Alan Bateman
Alan.Bateman at oracle.com
Wed Apr 26 15:40:09 UTC 2017
On 26/04/2017 16:31, forax at univ-mlv.fr wrote:
> :
> 4. create a classloader
> ClassLoader classLoader = new ClassLoader(parentClassLoader()) { /* make defineClass more visible */};
> 5. create your own layer [4]
> ModuleLayer layer = boot.defineModulesWithOneLoader(cf, classloader;
> 6. profit (i.e. now you can call define class on your classloader)
>
At #5 then you probably want defineModules(cf, m -> classloader);
-Alan
More information about the jigsaw-dev
mailing list