On 5/1/2017 1:48 PM, Stephan Herrmann wrote:
On 01.05.2017 22:17, Alex Buckley wrote:
- Another reference links "automatic modules" into JLS and will
probably
link to ModuleFinder.of(Path...), right?
This text is also an informative note. Automatic modules are
discovered through ModuleFinder.of, sure, and they appear in other
places in the java.lang.module API too -- but none of that is the
point of the note. The point of the note is that the developer
doesn't specify 'requires' any differently for an automatic module
than for an explicit module.
You make it sound as if automatic modules are relevant only at runtime.
Huh? The JPMS is assumed to be present at compile time, not just run
time. And automatic modules are a feature of the JPMS.
Alex
Wait, are you expecting compilers to actually use the implementation behind
ModuleFinder etc. in order to discover modules etc.?
When you said
"The host system must use the Java Platform Module System (as if by
execution of the 'resolve' method of java.lang.module.Configuration)"
I read this as requesting a compiler to perform the same operation as is
specified in that API.
Was the intention behind "must use the Java Platform Module System"
to say s.t. like "must call methods of API in java.lang.module"?
A compiler is not required to physically invoke methods of the JPMS API.
A compiler is required to determine which modules are read by each
module *as if* by execution of Configuration::resolve, a Java SE API.
The as-if term is common in Java SE Platform specs to mean "Implement it
any way you like, but the result must agree with the result from <the
thing after as-if>."
Alex