Review of platform modules & class analyzer change
Mandy Chung
mandy.chung at oracle.com
Tue May 18 22:37:05 PDT 2010
Webrev at:
http://cr.openjdk.java.net/~mchung/jigsaw/platform-modules
Summary of Changes:
1. All module names are qualified names with "jdk.*" or "sun.*"
prefix.
2. Class analyzer to generate requires optional in module-info.java
3. Take make/docs/NON_CORE_PKGS.gmk to prepare for the analysis
of public non-platform supported APIs.
4. Fix Resolver to link with optional modules if exist
5. Move make/modules/tools to make/tools/classanlyzer so it will
be built once.
Thanks
Mandy
------------
Below provides the high-level information about the platform
modules.
The names of the platform modules are qualifed names with "jdk."
or "sun." as the prefix.
The "sun.*" modules contain the implementation and only permit
the jdk modules to access. If a sun.* module contains public
supported API, there is a corresponding jdk.* module to reexport
the APIs. There are generally two kinds of sun.* modules:
1. a module containing the implementation
e.g. sun.tools.jaxws is the implementation for the jaxws tools
2. a module is locally connected with another module
due to split packages. e.g. jdk.boot and sun.sunec
[For now, the modules containing classes from rt.jar are locally
connected with jdk.boot so that they are loaded by BootLoader.
This is temporary until we replace with the correct way to determine
if a context is a platform context.]
There are three kinds of "jdk.*" modules:
1. A module contains the public supported APIs or reexports from
its sun.* module as described above. Application's
module-info.java can require "jdk.*" modules (except jdk.boot)
but not "sun.*".
2. A jdk tool e.g. jdk.javac, jdk.javadoc, jdk.jps etc
There is one module for each jdk tool whose module name
is jdk.<tool's name> until we support module with multiple
entry points.
3. Aggregator e.g. "jdk", "jdk.jre", "jdk.langtools", etc
These modules are empty and they declare a list of required
modules so that one can install for example the full jdk
in one single jmod install command.
Long-term: I expect that there will be modules for the platform
APIs (e.g. with "java." prefix) and "jdk."* modules will provide
the implementation.
I generate a few simplified graphs to show the current jdk dependencies:
- dependences to jdk.boot and jdk.base are not shown
- only show jdk.* modules unless the sun.* module doesn't have
a corresponding jdk.* module
http://cr.openjdk.java.net/~mchung/jigsaw/graphs/
modules.png - shows the entire jdk (minus the legacy and deprecated
modules)
jre.png - shows the dependences of the jdk.jre module
tools.png - shows all jdk tools
cli.tools.png and gui.tools.png - separate CLI and GUI tools
langtools.png - show langtools
More information about the jigsaw-dev
mailing list