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