Re: Patch-module with dynamic layer creating.

2018-10-13 Thread Alan Bateman
On 13/10/2018 08:54, Alex Sviridov wrote: : I am sorry, maybe I didn't express this very clear: I mean something like this: ModuleLayer layer = parent.defineModulesWithOneLoader(cf, scl, args); Where args are for example String[] and we pass the same --add-exports, --add-opens, --patch-module

Re[2]: Patch-module with dynamic layer creating.

2018-10-13 Thread Alex Sviridov
Суббота, 13 октября 2018, 10:43 +03:00 от Alan Bateman : > >On 12/10/2018 21:57, Alex Sviridov wrote: >> 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 >> a

Re: Patch-module with dynamic layer creating.

2018-10-13 Thread Alan Bateman
On 12/10/2018 21:57, Alex Sviridov wrote: 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

Re[2]: Patch-module with dynamic layer creating.

2018-10-12 Thread Alex Sviridov
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

Re: Patch-module with dynamic layer creating.

2018-10-12 Thread Alan Bateman
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

Re[2]: Patch-module with dynamic layer creating.

2018-10-12 Thread Alex Sviridov
I am speaking not only about patch-module but about all possible options: --add-exports, --add-opens, --patch-module, --add-modules, --add-reads etc. Agree that "custom" support for them is not a good way. Alex >Пятница, 12 октября 2018, 17:50 +03:00 от Alan Bateman >: > >On 12/10/2018 13:16

Re: Patch-module with dynamic layer creating.

2018-10-12 Thread Alan Bateman
On 12/10/2018 13:16, Alex Sviridov wrote: Hi Alan Maybe it is necessary to add possibility to have equal control for boot layer and other layers. Because layers are graph but at this moment we can do for boot layer more then for others -> if we work with non boot layers we must use another sol

Re[2]: Patch-module with dynamic layer creating.

2018-10-12 Thread Alex Sviridov
Hi Alan Maybe it is necessary to add possibility to have equal control for boot layer and other layers. Because layers are graph but at this moment we can do for boot layer more then for others -> if we work with non boot layers we must use another solutions -> different solutions within one te

Re: Patch-module with dynamic layer creating.

2018-10-11 Thread Alan Bateman
On 11/10/2018 10:57, Alex Sviridov wrote: Hi all, I create ModuleLayer this way ModuleFinder finder = ModuleFinder.of(dir1, dir2, dir3); ModuleLayer parent = ModuleLayer.boot(); Configuration cf = parent.configuration().resolve(finder, ModuleFinder.of(), Set.of("myapp")); ClassLoader scl = Cla

Patch-module with dynamic layer creating.

2018-10-11 Thread Alex Sviridov
Hi all, I create ModuleLayer this way ModuleFinder finder = ModuleFinder.of(dir1, dir2, dir3); ModuleLayer parent = ModuleLayer.boot(); Configuration cf = parent.configuration().resolve(finder, ModuleFinder.of(), Set.of("myapp")); ClassLoader scl = ClassLoader.getSystemClassLoader(); ModuleLayer