module readability and exceptions in api

Alan Bateman Alan.Bateman at oracle.com
Sat Oct 13 07:24:48 UTC 2018


On 13/10/2018 00:40, Michał Zegan wrote:
> :
>
> Oh actually one question I forgot about: if I generate bytecode
> accessing classes in modules that I don't read, and I call
> Module.addReads on myself, I can then read the module with classes I
> want to access, however my module's class loader probably will not
> delegate to the other module's class loader for class loading, so how to
> solve this situation? Creating my own class loader that loads the
> bytecode would require to have separate module for the bytecode.
Right, the class loader delegation must respect the readability graph. 
There aren't any APIs for dynamically augmenting the delegation graph so 
it would require that bring your own class loaders (and specify a 
mapping function to defineModules) if you want to do that.

-Alan


More information about the jigsaw-dev mailing list