Re: module readability and exceptions in api

2018-10-14 Thread Michał Zegan
W dniu 14.10.2018 o 09:27, Alan Bateman pisze: > On 13/10/2018 15:12, Michał Zegan wrote: >> : >> hmm so it is not a good idea to, say, generate a bytecode/class to be >> defined as part of currently loaded module X by means of >> MethodHandles.Lookup.defineClass or something like that if this b

Re: module readability and exceptions in api

2018-10-14 Thread Alan Bateman
On 13/10/2018 15:12, Michał Zegan wrote: : hmm so it is not a good idea to, say, generate a bytecode/class to be defined as part of currently loaded module X by means of MethodHandles.Lookup.defineClass or something like that if this bytecode would have to access module Y that is currently not re

Re: module readability and exceptions in api

2018-10-13 Thread Michał Zegan
W dniu 13.10.2018 o 09:24, Alan Bateman pisze: > 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

Re: module readability and exceptions in api

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

Re: module readability and exceptions in api

2018-10-12 Thread Michał Zegan
W dniu 10.10.2018 o 22:09, Michał Zegan pisze: > > > 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 i

Re: module readability and exceptions in api

2018-10-11 Thread Jochen Theodorou
On 11.10.2018 19:57, Michał Zegan wrote: W dniu 11.10.2018 o 19:03, Jochen Theodorou pisze: On 10.10.2018 22:09, Michał Zegan wrote: [...] 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 what

Re: module readability and exceptions in api

2018-10-11 Thread Michał Zegan
W dniu 11.10.2018 o 19:03, Jochen Theodorou pisze: > On 10.10.2018 22:09, Michał Zegan wrote: > [...] >> 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? > > In my experience the

Re: module readability and exceptions in api

2018-10-11 Thread Jochen Theodorou
On 10.10.2018 22:09, Michał Zegan wrote: [...] 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? In my experience they are fast enough in many, if not most cases. But if you cannot do

Re: module readability and exceptions in api

2018-10-10 Thread Michał Zegan
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 t

Re: module readability and exceptions in api

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

module readability and exceptions in api

2018-10-10 Thread Michał Zegan
Hello, I have following 2 questions: 1. Reflection and MethodHandles throw exceptions deriving from java.lang.ReflectiveOperationException, that are checked exceptions. However, the whole module related api throws unchecked exceptions. What is the actual reason/motivation for using unchecked except