Hi Alan,

Thank you for detailed explanation. It is great that we have API that allows to 
implement
such features. However, what I suggest is a little different. I am speaking 
about using
existing code for such features. 

I think this way - firstly, we can do write the same code many times. We can, 
but we 
don't want. Secondly if we pass parameters to JPMS via JVM options to configure 
boot 
layer, it would be great if we had possibility to pass the same parameters to 
configure a 
custom layer without writing a line of code and use existing JDK code. 

Of course this is my person opinion. It is interesting to hear what other 
developers think.

>Пятница, 12 октября 2018, 19:24 +03:00 от Alan Bateman 
><alan.bate...@oracle.com>:
>
>On 12/10/2018 16:00, Alex Sviridov wrote:
>> I am speaking not only about patch-module but about all possible options:
>> --add-exports, --add-opens, --patch-module, --add-modules, --add-reads etc.
>>
>ModuleLayer defines static variants of the defineModuleXXX methods that 
>return a Controller object that you can use to do the equivalent of 
>--add-reads or --add-exports/-add-opens to export/open a package to 
>specific modules. The equivalent of --add-modules is to add module name 
>to the set of modules to resolve.
>
>For patching then it does mean writing code and creating your own 
>ModuleFinder but it shouldn't be too difficult.
>
>-Alan.


-- 
Alex Sviridov

Reply via email to