Cross module single ServiceProvider for JPMS services

Alex Sviridov ooo_saturn7 at mail.ru
Sun Apr 19 14:00:01 UTC 2020


Hi all,
 
Let's suppose we have modules (A, B, C..) and every module consumes and provides services.
To find these services I want to create one util class, for example ServiceProvider that will be used
by all modules to get necessary services. There are two ideas:
*  to have one point to control providing services within system
*  to avoid code duplication.
However, I can't do it. The problem is that if we put ServiceProvider, for example, in module A,
then it can find only services that module A uses (service is declared in  uses in module A module-info).
Is it possible to do, if yes, then how?
 
 
--
Alex Sviridov


More information about the jigsaw-dev mailing list