is ClassLoader.loadClass() supposed to work on module-info classes?
pbenedict at apache.org
Thu Dec 3 20:42:49 UTC 2015
On Thu, Dec 3, 2015 at 1:46 PM, Alex Buckley <alex.buckley at oracle.com>
> I expect you will say, "Encode exports somewhere other than the module
> declaration, such as with @Exported annotations on types or packages." To
> which I repeat: "if we're going to introduce the concept of a
> module to millions of Java developers, we see value in consolidating both
> kinds of configuration [dependencies and exports] in one place".
Regardless of the class file vs config file debate, I find it interesting
there is no room for annotations in the current solution. All of this is
still configuration anyway. An @Exported/@Retention(RUNTIME) would easily
eliminate all "export" directives from a developer's Java project. It would
also address Jonathan Gibbon's concern about having to syntax check package
names (empty or not). Anyway, if that is really off the table, have you
thought about how many tools are going to try to fill the gap by offering
the Module Descriptor to be auto-generated? I can easily see a
proliferation of custom x.y.z. at Exported per tool so that a project can be
preprocessed for module-info generation.
More information about the jigsaw-dev