Implied readability + layers

Alan Bateman Alan.Bateman at
Fri Nov 6 16:48:12 UTC 2015

On 06/11/2015 10:59, Ali Ebrahimi wrote:
> :
> module {
>          requires com.baz;
>          exports;
> }
In this example then will also need to require as 
otherwise will not compile (I assume you've deliberately removed 
the requires public for this example).

In any case, I think what you have here is:

layer1: at 1
     com.baz reads at 1

The (library) module com.baz has types in its API.

layer2 at 2 reads com.baz reads at 2

> :
> Result:
> bar1
> bar2
> As you can see reads at 2 without reflection.
Yes, because when creating the configuration for this layer then you are 
resolving and have arranged that it be found with the 
before-finder. You would get the same thing if you just resolved 
because resolving's dependences would require finding

In any case, I think you will start to see some of the issues that Alex 
warns about when you change to do more than invoke 
toString.  If you change it to create Bar and Baz objects for example 
then it's easy to provoke this example to fail with a loader constraint 


More information about the jigsaw-dev mailing list