8173303: Add module-subgraph images to main platform documentation
authormchung
Wed, 29 Mar 2017 09:40:41 -0700
changeset 44417 a431edba1629
parent 44416 2b02517c73a2
child 44418 7a4711350922
8173303: Add module-subgraph images to main platform documentation Reviewed-by: alanb, chegar, erikj, ihse, lancea Contributed-by: jonathan.gibbons@oracle.com, mandy.chung@oracle.com
jdk/make/GenerateModuleSummary.gmk
jdk/make/ModuleTools.gmk
jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java
jdk/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties
jdk/make/src/classes/build/tools/taglet/ModuleGraph.java
jdk/src/java.base/share/classes/module-info.java
jdk/src/java.datatransfer/share/classes/module-info.java
jdk/src/java.desktop/share/classes/module-info.java
jdk/src/java.instrument/share/classes/module-info.java
jdk/src/java.logging/share/classes/module-info.java
jdk/src/java.management.rmi/share/classes/module-info.java
jdk/src/java.management/share/classes/module-info.java
jdk/src/java.naming/share/classes/module-info.java
jdk/src/java.prefs/share/classes/module-info.java
jdk/src/java.rmi/share/classes/module-info.java
jdk/src/java.scripting/share/classes/module-info.java
jdk/src/java.se.ee/share/classes/module-info.java
jdk/src/java.se/share/classes/module-info.java
jdk/src/java.security.jgss/share/classes/module-info.java
jdk/src/java.security.sasl/share/classes/module-info.java
jdk/src/java.smartcardio/share/classes/module-info.java
jdk/src/java.sql.rowset/share/classes/module-info.java
jdk/src/java.sql/share/classes/module-info.java
jdk/src/java.transaction/share/classes/module-info.java
jdk/src/java.xml.crypto/share/classes/module-info.java
jdk/src/jdk.attach/share/classes/module-info.java
jdk/src/jdk.charsets/share/classes/module-info.java
jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java
jdk/src/jdk.crypto.ec/share/classes/module-info.java
jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java
jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java
jdk/src/jdk.httpserver/share/classes/module-info.java
jdk/src/jdk.jartool/share/classes/module-info.java
jdk/src/jdk.jcmd/share/classes/module-info.java
jdk/src/jdk.jconsole/share/classes/module-info.java
jdk/src/jdk.jdi/share/classes/module-info.java
jdk/src/jdk.jdwp.agent/share/classes/module-info.java
jdk/src/jdk.jlink/share/classes/module-info.java
jdk/src/jdk.jsobject/share/classes/module-info.java
jdk/src/jdk.jstatd/share/classes/module-info.java
jdk/src/jdk.localedata/share/classes/module-info.java
jdk/src/jdk.management.agent/share/classes/module-info.java
jdk/src/jdk.management/share/classes/module-info.java
jdk/src/jdk.naming.dns/share/classes/module-info.java
jdk/src/jdk.naming.rmi/share/classes/module-info.java
jdk/src/jdk.net/share/classes/module-info.java
jdk/src/jdk.sctp/share/classes/module-info.java
jdk/src/jdk.security.auth/share/classes/module-info.java
jdk/src/jdk.security.jgss/share/classes/module-info.java
jdk/src/jdk.zipfs/share/classes/module-info.java
--- a/jdk/make/GenerateModuleSummary.gmk	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/make/GenerateModuleSummary.gmk	Wed Mar 29 09:40:41 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
 include ModuleTools.gmk
 
 GENGRAPHS_DIR := $(IMAGES_OUTPUTDIR)/gengraphs
-SPEC_DOTFILES_DIR := $(IMAGES_OUTPUTDIR)/spec-dotfiles
+SPEC_DOTFILES_DIR := $(GENGRAPHS_DIR)/spec-dotfiles
 TOOLS_MODULE_SRCDIR := $(JDK_TOPDIR)/make/src/classes/build/tools/jigsaw
 
 $(GENGRAPHS_DIR)/jdk.dot: $(BUILD_JIGSAW_TOOLS)
--- a/jdk/make/ModuleTools.gmk	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/make/ModuleTools.gmk	Wed Mar 29 09:40:41 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,8 +23,9 @@
 # questions.
 #
 
-include $(SPEC)
-include MakeBase.gmk
+ifndef _MODULE_TOOLS_GMK
+_MODULE_TOOLS_GMK := 1
+
 include JavaCompilation.gmk
 
 TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
@@ -32,7 +33,7 @@
 # To avoid reevaluating the compilation setup for the tools each time this file
 # is included, the actual compilation is handled by CompileModuleTools.gmk. The
 # following trick is used to be able to declare a dependency on the built tools.
-BUILD_TOOLS_JDK := $(call SetupJavaCompilationCompileTarget, \
+BUILD_JIGSAW_TOOLS := $(call SetupJavaCompilationCompileTarget, \
     BUILD_JIGSAW_TOOLS, $(TOOLS_CLASSES_DIR))
 
 TOOL_GENGRAPHS := $(BUILD_JAVA) -esa -ea -cp $(TOOLS_CLASSES_DIR) \
@@ -47,3 +48,5 @@
     -cp $(TOOLS_CLASSES_DIR) \
     --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
     build.tools.jigsaw.AddPackagesAttribute
+
+endif # _MODULE_TOOLS_GMK
--- a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,7 +26,6 @@
 package build.tools.jigsaw;
 
 import com.sun.tools.jdeps.ModuleDotGraph;
-import com.sun.tools.jdeps.ModuleDotGraph.DotGraphBuilder;
 
 import java.io.IOException;
 import java.lang.module.Configuration;
@@ -36,10 +35,15 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 /**
  * Generate the DOT file for a module graph for each module in the JDK
@@ -50,13 +54,19 @@
     public static void main(String[] args) throws Exception {
         Path dir = null;
         boolean spec = false;
+        Properties props = null;
         for (int i=0; i < args.length; i++) {
             String arg = args[i];
             if (arg.equals("--spec")) {
                 spec = true;
+            } else if (arg.equals("--dot-attributes")) {
+                if (i++ == args.length) {
+                    throw new IllegalArgumentException("Missing argument: --dot-attributes option");
+                }
+                props = new Properties();
+                props.load(Files.newInputStream(Paths.get(args[i])));
             } else if (arg.equals("--output")) {
-                i++;
-                dir = i < args.length ? Paths.get(args[i]) : null;
+                dir = ++i < args.length ? Paths.get(args[i]) : null;
             } else if (arg.startsWith("-")) {
                 throw new IllegalArgumentException("Invalid option: " + arg);
             }
@@ -67,11 +77,14 @@
             System.exit(1);
         }
 
-        // setup and configure the dot graph attributes
-        initDotGraphAttributes();
         Files.createDirectories(dir);
-
-        GenGraphs genGraphs = new GenGraphs(dir, spec);
+        ModuleGraphAttributes attributes;
+        if (props != null) {
+            attributes = new ModuleGraphAttributes(props);
+        } else {
+            attributes = new ModuleGraphAttributes();
+        }
+        GenGraphs genGraphs = new GenGraphs(dir, spec, attributes);
 
         // print dot file for each module
         Map<String, Configuration> configurations = new HashMap<>();
@@ -99,49 +112,149 @@
         genGraphs.genDotFiles(configurations);
     }
 
-    static void initDotGraphAttributes() {
-        int h = 1000;
-        DotGraphBuilder.weight("java.se", "java.sql.rowset", h * 10);
-        DotGraphBuilder.weight("java.sql.rowset", "java.sql", h * 10);
-        DotGraphBuilder.weight("java.sql", "java.xml", h * 10);
-        DotGraphBuilder.weight("java.xml", "java.base", h * 10);
+    /**
+     * Custom dot file attributes.
+     */
+    static class ModuleGraphAttributes implements ModuleDotGraph.Attributes {
+        static Map<String, String> DEFAULT_ATTRIBUTES = Map.of(
+            "ranksep", "0.6",
+            "fontsize", "12",
+            "fontcolor", BLACK,
+            "fontname", "DejaVuSans",
+            "arrowsize", "1",
+            "arrowwidth", "2",
+            "arrowcolor", DARK_GRAY,
+            // custom
+            "requiresMandatedColor", LIGHT_GRAY,
+            "javaSubgraphColor", ORANGE,
+            "jdkSubgraphColor", BLUE
+        );
+
+        final Map<String, Integer> weights = new HashMap<>();
+        final List<Set<String>> ranks = new ArrayList<>();
+        final Map<String, String> attrs;
+        ModuleGraphAttributes(Map<String, String> attrs) {
+            int h = 1000;
+            weight("java.se", "java.sql.rowset", h * 10);
+            weight("java.sql.rowset", "java.sql", h * 10);
+            weight("java.sql", "java.xml", h * 10);
+            weight("java.xml", "java.base", h * 10);
+
+            ranks.add(Set.of("java.logging", "java.scripting", "java.xml"));
+            ranks.add(Set.of("java.sql"));
+            ranks.add(Set.of("java.compiler", "java.instrument"));
+            ranks.add(Set.of("java.desktop", "java.management"));
+            ranks.add(Set.of("java.corba", "java.xml.ws"));
+            ranks.add(Set.of("java.xml.bind", "java.xml.ws.annotation"));
+
+            this.attrs = attrs;
+        }
+
+        ModuleGraphAttributes() {
+            this(DEFAULT_ATTRIBUTES);
+        }
+        ModuleGraphAttributes(Properties props) {
+            this(toAttributes(props));
+        }
+
+        @Override
+        public double rankSep() {
+            return Double.valueOf(attrs.get("ranksep"));
+        }
+
+        @Override
+        public int fontSize() {
+            return Integer.valueOf(attrs.get("fontsize"));
+        }
+
+        @Override
+        public String fontName() {
+            return attrs.get("fontname");
+        }
 
-        DotGraphBuilder.sameRankNodes(Set.of("java.logging", "java.scripting", "java.xml"));
-        DotGraphBuilder.sameRankNodes(Set.of("java.sql"));
-        DotGraphBuilder.sameRankNodes(Set.of("java.compiler", "java.instrument"));
-        DotGraphBuilder.sameRankNodes(Set.of("java.desktop", "java.management"));
-        DotGraphBuilder.sameRankNodes(Set.of("java.corba", "java.xml.ws"));
-        DotGraphBuilder.sameRankNodes(Set.of("java.xml.bind", "java.xml.ws.annotation"));
-        DotGraphBuilder.setRankSep(0.7);
-        DotGraphBuilder.setFontSize(12);
-        DotGraphBuilder.setArrowSize(1);
-        DotGraphBuilder.setArrowWidth(2);
+        @Override
+        public String fontColor() {
+            return attrs.get("fontcolor");
+        }
+
+        @Override
+        public int arrowSize() {
+            return Integer.valueOf(attrs.get("arrowsize"));
+        }
+
+        @Override
+        public int arrowWidth() {
+            return Integer.valueOf(attrs.get("arrowwidth"));
+        }
+
+        @Override
+        public String arrowColor() {
+            return attrs.get("arrowcolor");
+        }
+
+        @Override
+        public List<Set<String>> ranks() {
+            return ranks;
+        }
+
+        @Override
+        public String requiresMandatedColor() {
+            return attrs.get("requiresMandatedColor");
+        }
+
+        @Override
+        public String javaSubgraphColor() {
+            return attrs.get("javaSubgraphColor");
+        }
+
+        @Override
+        public String jdkSubgraphColor() {
+            return attrs.get("jdkSubgraphColor");
+        }
+
+        @Override
+        public int weightOf(String s, String t) {
+            int w = weights.getOrDefault(s + ":" + t, 1);
+            if (w != 1)
+                return w;
+            if (s.startsWith("java.") && t.startsWith("java."))
+                return 10;
+            return 1;
+        }
+
+        public void weight(String s, String t, int w) {
+            weights.put(s + ":" + t, w);
+        }
+
+        static Map<String, String> toAttributes(Properties props) {
+            return DEFAULT_ATTRIBUTES.keySet().stream()
+                .collect(Collectors.toMap(Function.identity(),
+                    k -> props.getProperty(k, DEFAULT_ATTRIBUTES.get(k))));
+        }
     }
 
     private final Path dir;
     private final boolean spec;
-    GenGraphs(Path dir, boolean spec) {
+    private final ModuleGraphAttributes attributes;
+    GenGraphs(Path dir, boolean spec, ModuleGraphAttributes attributes) {
         this.dir = dir;
         this.spec = spec;
+        this.attributes = attributes;
     }
 
     void genDotFiles(Map<String, Configuration> configurations) throws IOException {
         ModuleDotGraph dotGraph = new ModuleDotGraph(configurations, spec);
-        dotGraph.genDotFiles(dir);
+        dotGraph.genDotFiles(dir, attributes);
     }
 
+    /**
+     * Returns true for any name if generating graph for non-spec;
+     * otherwise, returns true except "jdk" and name with "jdk.internal." prefix
+     */
     boolean accept(String name, ModuleDescriptor descriptor) {
-        if (!spec) return true;
-
-        if (name.equals("jdk"))
-            return false;
-
-        if (name.equals("java.se") || name.equals("java.se.ee"))
+        if (!spec)
             return true;
 
-        // only the module that has exported API
-        return descriptor.exports().stream()
-                         .filter(e -> !e.isQualified())
-                         .findAny().isPresent();
+        return !name.equals("jdk") && !name.startsWith("jdk.internal.");
     }
-}
\ No newline at end of file
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties	Wed Mar 29 09:40:41 2017 -0700
@@ -0,0 +1,2 @@
+arrowcolor=#999999
+requiresMandatedColor=#999999
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/src/classes/build/tools/taglet/ModuleGraph.java	Wed Mar 29 09:40:41 2017 -0700
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.taglet;
+
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Set;
+import javax.lang.model.element.Element;
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.doclet.Taglet;
+import static jdk.javadoc.doclet.Taglet.Location.*;
+
+/**
+ * A block tag to optionally insert a reference to a module graph.
+ */
+public class ModuleGraph implements Taglet {
+    private static final boolean enableModuleGraph =
+        Boolean.getBoolean("enableModuleGraph");
+
+    /** Returns the set of locations in which a taglet may be used. */
+    @Override
+    public Set<Location> getAllowedLocations() {
+        return EnumSet.of(MODULE);
+    }
+
+    @Override
+    public boolean isInlineTag() {
+        return false;
+    }
+
+    @Override
+    public String getName() {
+        return "moduleGraph";
+    }
+
+    @Override
+    public String toString(List<? extends DocTree> tags, Element element) {
+        if (!enableModuleGraph) {
+            return "";
+        }
+
+        String moduleName = element.getSimpleName().toString();
+        String imageFile = moduleName + "-graph.png";
+        int thumbnailHeight = -1;
+        String hoverImage = "";
+        if (!moduleName.equals("java.base")) {
+            thumbnailHeight = 100; // also appears in the stylesheet
+            hoverImage = "<span>"
+                + getImage(moduleName, imageFile, -1, true)
+                + "</span>";
+        }
+        return "<dt>"
+            + "<span class=\"simpleTagLabel\">Module Graph:</span>\n"
+            + "</dt>"
+            + "<dd>"
+            + "<a class=moduleGraph href=\"" + imageFile + "\">"
+            + getImage(moduleName, imageFile, thumbnailHeight, false)
+            + hoverImage
+            + "</a>"
+            + "</dd>";
+    }
+
+    private static final String VERTICAL_ALIGN = "vertical-align:top";
+    private static final String BORDER = "border: solid lightgray 1px;";
+
+    private String getImage(String moduleName, String file, int height, boolean useBorder) {
+        return String.format("<img style=\"%s\" alt=\"Module graph for %s\" src=\"%s\"%s>",
+                             useBorder ? BORDER + " " + VERTICAL_ALIGN : VERTICAL_ALIGN,
+                             moduleName,
+                             file,
+                             (height <= 0 ? "" : " height=\"" + height + "\""));
+    }
+}
--- a/jdk/src/java.base/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.base/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the foundational APIs of the Java SE Platform.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.base {
--- a/jdk/src/java.datatransfer/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.datatransfer/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -24,8 +24,9 @@
  */
 
 /**
- * Defines an API for transferring data between and within applications.
+ * Defines the API for transferring data between and within applications.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.datatransfer {
--- a/jdk/src/java.desktop/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.desktop/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -27,6 +27,7 @@
  * Defines the AWT and Swing user interface toolkits, plus APIs for
  * accessibility, audio, imaging, printing, and JavaBeans.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.desktop {
--- a/jdk/src/java.instrument/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.instrument/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -27,6 +27,7 @@
  * Defines services that allow agents to
  * instrument programs running on the JVM.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.instrument {
--- a/jdk/src/java.logging/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.logging/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the Java Logging API.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.logging {
--- a/jdk/src/java.management.rmi/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.management.rmi/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -46,6 +46,7 @@
  *           and load the appropriate {@code JMXConnectorServerProvider} service
  *           implementation for the given protocol.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.management.rmi {
--- a/jdk/src/java.management/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.management/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -29,6 +29,7 @@
  * The JMX API consists of interfaces for monitoring and management of the
  * JVM and other components in the Java runtime.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.management {
--- a/jdk/src/java.naming/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.naming/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the Java Naming and Directory Interface (JNDI) API.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.naming {
--- a/jdk/src/java.prefs/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.prefs/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the Preferences API.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.prefs {
--- a/jdk/src/java.rmi/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.rmi/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the Remote Method Invocation (RMI) API.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.rmi {
--- a/jdk/src/java.scripting/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.scripting/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the Scripting API.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.scripting {
--- a/jdk/src/java.se.ee/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.se.ee/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -29,6 +29,7 @@
  * This module requires {@code java.se} and supplements it with modules
  * that define CORBA and Java EE APIs. These modules are upgradeable.
  *
+ * @moduleGraph
  * @since 9
  */
 @SuppressWarnings("deprecation")
--- a/jdk/src/java.se/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.se/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -29,6 +29,7 @@
  * The modules defining CORBA and Java EE APIs are not required by
  * this module, but they are required by {@code java.se.ee}.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.se {
--- a/jdk/src/java.security.jgss/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.security.jgss/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -28,6 +28,7 @@
  * <P>
  * This module also contains GSS-API mechanisms including Kerberos v5 and SPNEGO.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.security.jgss {
--- a/jdk/src/java.security.sasl/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.security.sasl/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -30,6 +30,7 @@
  * This module also contains SASL mechanisms including DIGEST-MD5,
  * CRAM-MD5, and NTLM.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.security.sasl {
--- a/jdk/src/java.smartcardio/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.smartcardio/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the Java Smart Card I/O API.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.smartcardio {
--- a/jdk/src/java.sql.rowset/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.sql.rowset/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the JDBC RowSet API.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.sql.rowset {
--- a/jdk/src/java.sql/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.sql/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the JDBC API.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.sql {
--- a/jdk/src/java.transaction/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.transaction/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -29,6 +29,7 @@
  * The subset consists of RMI exception types which are mapped to CORBA system
  * exceptions by the 'Java Language to IDL Mapping Specification'.
  *
+ * @moduleGraph
  * @since 9
  */
 @Deprecated(since="9", forRemoval=true)
--- a/jdk/src/java.xml.crypto/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/java.xml.crypto/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -24,8 +24,9 @@
  */
 
 /**
- * Defines an API for XML cryptography.
+ * Defines the API for XML cryptography.
  *
+ * @moduleGraph
  * @since 9
  */
 module java.xml.crypto {
--- a/jdk/src/jdk.attach/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.attach/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the attach API.
  *
+ * @moduleGraph
  * @since 9
  */
 module jdk.attach {
--- a/jdk/src/jdk.charsets/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.charsets/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,13 @@
  * questions.
  */
 
+/**
+ * {@link java.nio.charset.Charset Charset} provider for the charsets that
+ * are not in {@code java.base} (mostly double byte and IBM charsets).
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.charsets {
     provides java.nio.charset.spi.CharsetProvider
         with sun.nio.cs.ext.ExtendedCharsets;
--- a/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * The SunPKCS11 security provider.
  *
+ * @moduleGraph
  * @since 9
  */
 module jdk.crypto.cryptoki {
--- a/jdk/src/jdk.crypto.ec/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.crypto.ec/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * The SunEC security provider.
  *
+ * @moduleGraph
  * @since 9
  */
 module jdk.crypto.ec {
--- a/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * The SunMSCAPI security provider.
  *
+ * @moduleGraph
  * @since 9
  */
 module jdk.crypto.mscapi {
--- a/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * The OracleUCrypto security provider.
  *
+ * @moduleGraph
  * @since 9
  */
 module jdk.crypto.ucrypto {
--- a/jdk/src/jdk.httpserver/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.httpserver/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * Defines the JDK-specific API for HTTP server.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.httpserver {
 
     exports com.sun.net.httpserver;
--- a/jdk/src/jdk.jartool/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.jartool/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,13 @@
  * questions.
  */
 
+/**
+ * Defines tools for manipulating Java Archive (JAR) files,
+ * including the jar and jarsigner tools.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.jartool {
     exports com.sun.jarsigner;
     exports jdk.security.jarsigner;
--- a/jdk/src/jdk.jcmd/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.jcmd/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,13 @@
  * questions.
  */
 
+/**
+ * Defines tools for diagnostics and troubleshooting a JVM,
+ * including the jcmd, jps, jstat and other diagnostics tools.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.jcmd {
     requires jdk.attach;
     requires jdk.internal.jvmstat;
--- a/jdk/src/jdk.jconsole/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.jconsole/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,13 @@
  * questions.
  */
 
+/**
+ * Defines the JMX graphical tool, jconsole, for monitoring and managing
+ * a running application.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.jconsole {
     requires transitive java.desktop;
     requires transitive java.management;
--- a/jdk/src/jdk.jdi/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.jdi/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Defines the Java Debugger Interface.
  *
+ * @moduleGraph
  * @since 9
  */
 module jdk.jdi {
--- a/jdk/src/jdk.jdwp.agent/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.jdwp.agent/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -26,6 +26,7 @@
 /**
  * Java Debug Wire Protocol.
  *
+ * @moduleGraph
  * @since 9
  */
 module jdk.jdwp.agent {
--- a/jdk/src/jdk.jlink/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.jlink/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * Defines the Java linker tool, jlink.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.jlink {
     requires jdk.internal.opt;
     requires jdk.jdeps;
--- a/jdk/src/jdk.jsobject/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.jsobject/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * Defines the API for the JavaScript Object.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.jsobject {
     requires java.desktop;
     exports netscape.javascript;
--- a/jdk/src/jdk.jstatd/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.jstatd/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,13 @@
  * questions.
  */
 
+/**
+ * Defines the tool for starting a daemon for the jstat tool to monitor
+ * JVM statistics remotely.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.jstatd {
     requires java.rmi;
     requires jdk.internal.jvmstat;
@@ -32,4 +39,3 @@
 
     provides sun.jvmstat.monitor.MonitoredHostService with sun.jvmstat.perfdata.monitor.protocol.rmi.MonitoredHostRmiService;
 }
-
--- a/jdk/src/jdk.localedata/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.localedata/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * Locale data provider for locales other than {@linkplain java.util.Locale#US US locale}.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.localedata {
     provides sun.util.locale.provider.LocaleDataMetaInfo with
         sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo,
--- a/jdk/src/jdk.management.agent/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.management.agent/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * Define the JMX management agent.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.management.agent {
     requires java.management;
     requires java.management.rmi;
--- a/jdk/src/jdk.management/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.management/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * Defines the JDK-specific Management Interfaces for JVM.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.management {
     requires transitive java.management;
 
--- a/jdk/src/jdk.naming.dns/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.naming.dns/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * DNS Java Naming provider.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.naming.dns {
     requires java.naming;
 
--- a/jdk/src/jdk.naming.rmi/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.naming.rmi/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * RMI Java Naming provider.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.naming.rmi {
     requires java.naming;
     requires java.rmi;
--- a/jdk/src/jdk.net/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.net/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * Defines the JDK-specific Networking API.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.net {
     exports jdk.net;
 }
--- a/jdk/src/jdk.sctp/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.sctp/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * Defines the JDK-specific API for SCTP.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.sctp {
     exports com.sun.nio.sctp;
 }
--- a/jdk/src/jdk.security.auth/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.security.auth/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -27,6 +27,7 @@
  * Contains the implementation of the javax.security.auth.* interfaces and
  * various authentication modules.
  *
+ * @moduleGraph
  * @since 9
  */
 module jdk.security.auth {
--- a/jdk/src/jdk.security.jgss/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.security.jgss/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -27,6 +27,7 @@
  * Defines Java extensions to the GSS-API and an implementation of the SASL
  * GSSAPI mechanism.
  *
+ * @moduleGraph
  * @since 9
  */
 module jdk.security.jgss {
--- a/jdk/src/jdk.zipfs/share/classes/module-info.java	Wed Mar 29 13:16:12 2017 +0100
+++ b/jdk/src/jdk.zipfs/share/classes/module-info.java	Wed Mar 29 09:40:41 2017 -0700
@@ -23,6 +23,12 @@
  * questions.
  */
 
+/**
+ * Zip file system provider.
+ *
+ * @moduleGraph
+ * @since 9
+ */
 module jdk.zipfs {
     provides java.nio.file.spi.FileSystemProvider with jdk.nio.zipfs.ZipFileSystemProvider;
 }