module readability and exceptions in api
Alan Bateman
Alan.Bateman at oracle.com
Wed Oct 10 18:36:00 UTC 2018
On 10/10/2018 17:43, Michał Zegan wrote:
> 2. What is the use for Module.addReads and
> ModuleLayer.Controller.addReads methods?
Module addReads is important when generating bytecode in your own module
with references to classes in modules that you don't read. Another
example is where you create method handles for a method in a class that
is a member of a module that you don't read.
The equivalent ModuleLayer.Controller addReads is the container case.
There was a recent thread here with Alex Svirivov where he's prototyping
creating a container creating a module layer for a web application. The
container may need to use addExports to export the web application entry
point to the container and (depending on how the container invokes the
web application entry point) it may need to read the module in the child
layer too.
-Alan
More information about the jigsaw-dev
mailing list