dependencies between automatic modules

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dependencies between automatic modules

Michał Zegan
Hello,
I know that automatic modules are visible and named module can depend on
them. However what about dependencies between automatic modules? Do I
have to manually add all automatic modules to the graph in such a case,
at least if two automatic modules are tightly coupled, as in one depends
on packages and classes of the other?

Reply | Threaded
Open this post in threaded view
|

Re: dependencies between automatic modules

Zheka Kozlov
Since automatic modules require all other modules, when the first module is
resolved, the other automatic modules are automatically resolved too. So,
you don't have to add all automatic modules manually to the graph. It's
enough to make a dependency only on the automatic module you need. Then the
other automatic modules will automatically get into the module graph.

пн, 8 апр. 2019 г. в 13:02, Michał Zegan <[hidden email]>:

> Hello,
> I know that automatic modules are visible and named module can depend on
> them. However what about dependencies between automatic modules? Do I
> have to manually add all automatic modules to the graph in such a case,
> at least if two automatic modules are tightly coupled, as in one depends
> on packages and classes of the other?
>
>
Reply | Threaded
Open this post in threaded view
|

Re: dependencies between automatic modules

Alan Bateman
On 08/04/2019 07:31, Zheka Kozlov wrote:
> Since automatic modules require all other modules, when the first module is
> resolved, the other automatic modules are automatically resolved too. So,
> you don't have to add all automatic modules manually to the graph. It's
> enough to make a dependency only on the automatic module you need. Then the
> other automatic modules will automatically get into the module graph.
>
That's right. The "Module Resolution" section in the java.lang.module
package description has more on this, look for "If at least one
automatic module is enumerated ...".

-Alan