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

Jochen Theodorou blackdrag at gmx.org
Thu Mar 16 14:53:32 UTC 2017

On 16.03.2017 14:39, David M. Lloyd wrote:
> It's clear that modules are not to be treated like classes, because (for
> example) circularity among modules is considered "bad" whereas
> circularity among classes has been shown to be indispensable, and
> classes within a class loader or module are loaded and resolved lazily
> whereas modules are loaded and resolved aggressively, etc.  But I see
> your point that only "special" citizens ought to mutate a module.  I
> agree, but I do not think this should be limited to agents: containers
> also have a similar need for similar reasons.

and I would not simply limit this to containers as well. If you have a 
programming language runtime for example you have an element, that will 
have to do similar tasks to what Java internals will want to do.. for 
example proxies. But the big difference is, that we are not containing 
the classes we do the work for. The modules containing those might even 
be loaded already and instances of those classes may already exist.

I was told an agent can mutate the module information. And I don't 
understand if an agent can do it, why a normal method cannot... or what 
makes a citizen "special" enough to be able to do it. On the contrary 
this discussion now gives me the impression an agent cannot mutate the 
module after it came into existence without duplicating classes. Clearly 
I had yet no time to actually try this :(

bye Jochen

More information about the jigsaw-dev mailing list