rationale behind "uses" directive?

Gernot Neppert mcnepp02 at googlemail.com
Mon Jan 11 10:17:59 UTC 2016


Dear Experts,

a little belatedly, I've just read through the "State of the module system".
While I find most of it easily comprehensible, I couldn't quite figure out
what could possibly the rationale behind the new (module-specific) "uses"
directive.

The corresponding "provides" directive makes immediate sense in terms of
documentation and possible performance gains during Service-lookup by not
having to scan META-INF resources.

But why would we want to document that a module _uses_ a Service? What is
so special about the ServiceLoader mechanism that we want to advertise
whenever a module makes use of it?

Any pointer would be appreciated!

Gernot



More information about the jpms-spec-comments mailing list