#LayerPrimitives aka allowing to add private package at runtime to a module ?

Stephane Epardaud stef at epardaud.fr
Thu Mar 16 14:33:35 UTC 2017



On 16/03/2017 12:33, Remi Forax wrote:
> With JPMS, a module is now part of the Java language, so it seems weird to make it mutable the same way, a java.lang.Class is not mutable in Java.
>
Actually, I was more thinking that it was akin to "packages" in 
reflection, where they are mutable in the sense that you cannot mutate 
classes once loaded, but you can load classes one after the other, and 
you can keep adding classes to packages as long as you want. If packages 
in reflection would let you access its member list, that would be 
mutable. Doesn't strike me as different with modules which are just 
package containers. I can totally imagine class loaders adding new 
packages to modules at run-time the same way we can add classes to packages.


More information about the jpms-spec-observers mailing list