tools in modules.config
Mandy Chung
Mandy.Chung at Sun.COM
Mon Mar 15 16:54:17 PDT 2010
On 03/15/10 14:49, Jonathan Gibbons wrote:
> I'm mildly surprised by the layout of the tools and related modules. I'm
> curious if the current layout is by necessity or choice.
There will be one module per tool since each tool has its own entry
point. In my first attempt, I grouped the langtools classes like what
you expected (e.g. apt classes in apt module). I recalled that there is
some sort of circular dependencies that I took the quick-and-dirty
solution to group the apt, javadoc, doclets and javac in the tools
module and plan to revisit later.
Since the decision whether the jdk modules would be coarse-grained
modules or fine-grained is yet to be made, I didn't pursue further
modularize the tools' classes (at one point in time - it was inclined to
have coarse-grained modules).
In any case, it would be good to clean up the dependencies. I will do
some experiment, find out the dependencies and let you know.
Mandy
> FWIW, apt and javadoc (and javah) depend on javac, but not the other way
> around.
>
> By analogy with javah and javap, I would have expected the apt classes
> to live in the apt module, and likewise the javadoc and doclets classes
> to live in the doclets module.
>
> Are there any dependencies you discovered that makes it necessary to
> have the classes as they are?
>
> -- Jon
>
>>
>>
>> module tools {
>> include com.sun.tools.apt.**;
>> include com.sun.tools.javac.**,
>> com.sun.source.**;
>> include com.sun.tools.doclets.**;
>> include com.sun.tools.javadoc.**,
>> com.sun.javadoc.**;
>> exclude com.sun.tools.javac.Launcher;
>> }
>>
>> module javac {
>> class com.sun.tools.javac.Main;
>> }
>>
>> module apt {
>> class com.sun.tools.apt.Main;
>> }
>>
>> module javadoc {
>> class com.sun.tools.javadoc.Main;
>> }
>>
>> module javah {
>> include com.sun.tools.javah.**;
>> class com.sun.tools.javah.Main;
>> }
>>
>> module javap {
>> include com.sun.tools.javap.**,
>> com.sun.tools.classfile.**;
>> class com.sun.tools.javap.Main;
>> }
>
More information about the jigsaw-dev
mailing list