provides and requires static ... runtime error

Josiah Noel josiahnoel at gmail.com
Tue Apr 18 15:01:03 UTC 2023


On Tue, Apr 18, 2023 at 8:46 AM Ron Pressler <ron.pressler at oracle.com>
wrote:

>
> Which makes me wonder, what is the root of the optionality in your code?
> I.e. how does io.avaje.inject come to be resolved?
>

So avaje jsonb/config/http implements SPI interfaces exported by avaje
inject(which is added as a maven optional dependency). The idea here is
that the plugin implementation would be loaded by avaje-inject to add to
the DI scope.

Outside of avaje inject, these service implementation classes have no
meaning and are not meant to be instantiated. In some cases, the service
implementation package may not even be exported by the module, so even if
you tried you couldn't instantiate outside of a service loader.

Does this help answer your question? Or did I misread it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jigsaw-dev/attachments/20230418/36f8316b/attachment.htm>


More information about the jigsaw-dev mailing list