module readability and exceptions in api
webczat_200 at poczta.onet.pl
Wed Oct 10 20:09:47 UTC 2018
W dniu 10.10.2018 o 20:36, Alan Bateman pisze:
> 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.
Oh when we are at it, a bit offtopic, can bytecode generation be
replaced with method handle usage, or method handles are still not fast
enough... or whatever?
More information about the jigsaw-dev