[jsr294-modularity-eg] superpackage files
Alex.Buckley at Sun.COM
Wed Apr 11 14:49:58 EDT 2007
(Following Michal's idea of making the subject reflect the issue)
Eugene Vigdorchik wrote:
> First of of all the rules for determining superpackage file location
> should be a part of JLS, so that all tools/compilers should agree on them.
> Since this place is to be visible from the classes that import the class
> from superpackage, I would suggest the set of directories of all
> packages common to all classes making up a superpackage transitively.
> That is for classes Foo.Bar.A and Foo.Bar.B consistuting a superpackage,
> the superpackage file should be either in the default package or in Foo
> or in Bar.
Filenames and locations are traditionally not specified in the JLS. JLS
7.2.1 is careful to say that the well-known mapping of a package name to
a hierarchical directory structure is merely an example. I would hope to
discuss the location of super-package.java in the JLS in a similar way,
establishing a de facto standard by example and by early availability of
As for the location itself, you seem to be saying that it should be
based on the names of member packages, not the name of the superpackage
itself. Is that right? If so, what happens when unrelated superpackages
each require super-package.java to live in the same location? Perhaps
you could give some examples.
More information about the jsr294-modularity-eg