What does a qualified name mean for a module?

Alex Buckley alex.buckley at oracle.com
Tue Jun 6 19:51:26 UTC 2017


On 6/6/2017 10:14 AM, Stephan Herrmann wrote:
> Normally, a qualified name denotes two things: a parent element and a
> child. The package name "java.lang" has a qualifier "java" which
> denotes a top-level package and "lang" can be used relative to that
> package to denote a member package etc.
>
> For a module - say "java.base" - the qualifier "java" denotes
> nothing. And hence, the simple name "base" cannot be resolved in any
> context.
>
> So the question is: should ModuleElement.getSimpleName() answer the
> totally useless last segment of the name, or should it answer the
> same as getQualifiedName()?

When Joe asked for feedback on this API two months ago [1], I made 
essentially the same point [2], and a bug was filed [3].

Alex

[1] 
http://mail.openjdk.java.net/pipermail/compiler-dev/2017-April/010896.html
[2] 
http://mail.openjdk.java.net/pipermail/compiler-dev/2017-April/010905.html
[3] https://bugs.openjdk.java.net/browse/JDK-8163989


More information about the jigsaw-dev mailing list