Let's suppose we have JPMS modules - A
,B
, C
etc. A
defines some service a.spi.SomeService
and all there modules have implementation of this service. For example, module B
has an implementation of this service b.spi.SomeServiceImpl
, so, in module-info of B
we have:
provides a.spi.SomeService with b.spi.SomeServiceImpl;
Can we make the service of A
, which provides module B
, C
etc available only to module A
, so as all other modules, even if they provides a.spi.SomeService
too, couldn't use it?