2. Let's suppose I have the following layer graph:
1) boot
2) layerA (parent - boot) has moduleX
3) layerB (parent - boot) has moduleX
4) layerC (parents - layerA, layerB) has moduleY
As I understand it is a possible situation. ModuleY requires moduleX that is
present in two parent layers.
The question - how can I find out from which layer moduleX will be used for
moduleY?
The Configuration objects for layerA, layerB and layerC encapsulate the readability graphs used to
the these module layers. Use Configuration::modules to get the set the resolved modules in the
configuration, and ResovledRead::read to get the set of modules that are read. This will allow you
to see which modules in C read "moduleX" in A and which modules in C read
"moduleX" in B.
Still can't get reference to read modules:
layerC.configuration().modules().stream().forEach((m) -> {
for (ResolvedModule r : m.reads()) {
//LINE X
}
});
At LINE X I need to get `Module` from `ResolvedModule` to use Module.getLayer()
method. How to do it?
Best regards, Pavel