diff --git a/jdk/make/GenerateModuleSummary.gmk b/jdk/make/GenerateModuleSummary.gmk index 9f52ed37a74..b96e9ded8ca 100644 --- a/jdk/make/GenerateModuleSummary.gmk +++ b/jdk/make/GenerateModuleSummary.gmk @@ -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 MakeBase.gmk 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) diff --git a/jdk/make/ModuleTools.gmk b/jdk/make/ModuleTools.gmk index 45bfbae630e..c48a1b6ec3d 100644 --- a/jdk/make/ModuleTools.gmk +++ b/jdk/make/ModuleTools.gmk @@ -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 @@ TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes # 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 @@ TOOL_ADD_PACKAGES_ATTRIBUTE := $(BUILD_JAVA) $(JAVA_FLAGS_SMALL) \ -cp $(TOOLS_CLASSES_DIR) \ --add-exports java.base/jdk.internal.module=ALL-UNNAMED \ build.tools.jigsaw.AddPackagesAttribute + +endif # _MODULE_TOOLS_GMK diff --git a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java index 902185eef3a..8301929ebd1 100644 --- a/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java +++ b/jdk/make/src/classes/build/tools/jigsaw/GenGraphs.java @@ -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.lang.module.ModuleReference; 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 class GenGraphs { 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 @@ public class GenGraphs { 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 configurations = new HashMap<>(); @@ -99,49 +112,149 @@ public class GenGraphs { 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 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 + ); - 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); + final Map weights = new HashMap<>(); + final List> ranks = new ArrayList<>(); + final Map attrs; + ModuleGraphAttributes(Map 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"); + } + + @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> 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 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 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 +} diff --git a/jdk/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties b/jdk/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties new file mode 100644 index 00000000000..75348c3f7be --- /dev/null +++ b/jdk/make/src/classes/build/tools/jigsaw/javadoc-graphs.properties @@ -0,0 +1,2 @@ +arrowcolor=#999999 +requiresMandatedColor=#999999 diff --git a/jdk/make/src/classes/build/tools/taglet/ModuleGraph.java b/jdk/make/src/classes/build/tools/taglet/ModuleGraph.java new file mode 100644 index 00000000000..6983eaa64d2 --- /dev/null +++ b/jdk/make/src/classes/build/tools/taglet/ModuleGraph.java @@ -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 getAllowedLocations() { + return EnumSet.of(MODULE); + } + + @Override + public boolean isInlineTag() { + return false; + } + + @Override + public String getName() { + return "moduleGraph"; + } + + @Override + public String toString(List 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 = "" + + getImage(moduleName, imageFile, -1, true) + + ""; + } + return "
" + + "Module Graph:\n" + + "
" + + "
" + + "" + + getImage(moduleName, imageFile, thumbnailHeight, false) + + hoverImage + + "" + + "
"; + } + + 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("\"Module", + useBorder ? BORDER + " " + VERTICAL_ALIGN : VERTICAL_ALIGN, + moduleName, + file, + (height <= 0 ? "" : " height=\"" + height + "\"")); + } +} diff --git a/jdk/src/java.base/share/classes/module-info.java b/jdk/src/java.base/share/classes/module-info.java index 60b1512cbca..1c3f76927aa 100644 --- a/jdk/src/java.base/share/classes/module-info.java +++ b/jdk/src/java.base/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the foundational APIs of the Java SE Platform. * + * @moduleGraph * @since 9 */ module java.base { diff --git a/jdk/src/java.datatransfer/share/classes/module-info.java b/jdk/src/java.datatransfer/share/classes/module-info.java index 35b7571fb92..41fbc8d7b0c 100644 --- a/jdk/src/java.datatransfer/share/classes/module-info.java +++ b/jdk/src/java.datatransfer/share/classes/module-info.java @@ -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 { diff --git a/jdk/src/java.desktop/share/classes/module-info.java b/jdk/src/java.desktop/share/classes/module-info.java index 841618d8216..29d24e68df3 100644 --- a/jdk/src/java.desktop/share/classes/module-info.java +++ b/jdk/src/java.desktop/share/classes/module-info.java @@ -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 { diff --git a/jdk/src/java.instrument/share/classes/module-info.java b/jdk/src/java.instrument/share/classes/module-info.java index 4a7f2199e1d..c0a38104c13 100644 --- a/jdk/src/java.instrument/share/classes/module-info.java +++ b/jdk/src/java.instrument/share/classes/module-info.java @@ -27,6 +27,7 @@ * Defines services that allow agents to * instrument programs running on the JVM. * + * @moduleGraph * @since 9 */ module java.instrument { diff --git a/jdk/src/java.logging/share/classes/module-info.java b/jdk/src/java.logging/share/classes/module-info.java index a8120deeedb..2ddf82f4599 100644 --- a/jdk/src/java.logging/share/classes/module-info.java +++ b/jdk/src/java.logging/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the Java Logging API. * + * @moduleGraph * @since 9 */ module java.logging { diff --git a/jdk/src/java.management.rmi/share/classes/module-info.java b/jdk/src/java.management.rmi/share/classes/module-info.java index fca14d540a8..ac6eabc83e3 100644 --- a/jdk/src/java.management.rmi/share/classes/module-info.java +++ b/jdk/src/java.management.rmi/share/classes/module-info.java @@ -46,6 +46,7 @@ * and load the appropriate {@code JMXConnectorServerProvider} service * implementation for the given protocol. * + * @moduleGraph * @since 9 */ module java.management.rmi { diff --git a/jdk/src/java.management/share/classes/module-info.java b/jdk/src/java.management/share/classes/module-info.java index fd8ec495098..c407821e505 100644 --- a/jdk/src/java.management/share/classes/module-info.java +++ b/jdk/src/java.management/share/classes/module-info.java @@ -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 { diff --git a/jdk/src/java.naming/share/classes/module-info.java b/jdk/src/java.naming/share/classes/module-info.java index bd1332a5f7b..f8ec57900f0 100644 --- a/jdk/src/java.naming/share/classes/module-info.java +++ b/jdk/src/java.naming/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the Java Naming and Directory Interface (JNDI) API. * + * @moduleGraph * @since 9 */ module java.naming { diff --git a/jdk/src/java.prefs/share/classes/module-info.java b/jdk/src/java.prefs/share/classes/module-info.java index 15c47ad206b..b20d962967c 100644 --- a/jdk/src/java.prefs/share/classes/module-info.java +++ b/jdk/src/java.prefs/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the Preferences API. * + * @moduleGraph * @since 9 */ module java.prefs { diff --git a/jdk/src/java.rmi/share/classes/module-info.java b/jdk/src/java.rmi/share/classes/module-info.java index b10be8aee8e..6509952de9a 100644 --- a/jdk/src/java.rmi/share/classes/module-info.java +++ b/jdk/src/java.rmi/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the Remote Method Invocation (RMI) API. * + * @moduleGraph * @since 9 */ module java.rmi { diff --git a/jdk/src/java.scripting/share/classes/module-info.java b/jdk/src/java.scripting/share/classes/module-info.java index 0ee7a489b1f..42854afc437 100644 --- a/jdk/src/java.scripting/share/classes/module-info.java +++ b/jdk/src/java.scripting/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the Scripting API. * + * @moduleGraph * @since 9 */ module java.scripting { diff --git a/jdk/src/java.se.ee/share/classes/module-info.java b/jdk/src/java.se.ee/share/classes/module-info.java index 0156b7abe68..c12f8048963 100644 --- a/jdk/src/java.se.ee/share/classes/module-info.java +++ b/jdk/src/java.se.ee/share/classes/module-info.java @@ -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") diff --git a/jdk/src/java.se/share/classes/module-info.java b/jdk/src/java.se/share/classes/module-info.java index 4d0d87869f3..33b99b1c13c 100644 --- a/jdk/src/java.se/share/classes/module-info.java +++ b/jdk/src/java.se/share/classes/module-info.java @@ -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 { diff --git a/jdk/src/java.security.jgss/share/classes/module-info.java b/jdk/src/java.security.jgss/share/classes/module-info.java index 4bb35fd807d..e73920ec79b 100644 --- a/jdk/src/java.security.jgss/share/classes/module-info.java +++ b/jdk/src/java.security.jgss/share/classes/module-info.java @@ -28,6 +28,7 @@ *

* This module also contains GSS-API mechanisms including Kerberos v5 and SPNEGO. * + * @moduleGraph * @since 9 */ module java.security.jgss { diff --git a/jdk/src/java.security.sasl/share/classes/module-info.java b/jdk/src/java.security.sasl/share/classes/module-info.java index 0f4e1fd9f1f..162f844960e 100644 --- a/jdk/src/java.security.sasl/share/classes/module-info.java +++ b/jdk/src/java.security.sasl/share/classes/module-info.java @@ -30,6 +30,7 @@ * This module also contains SASL mechanisms including DIGEST-MD5, * CRAM-MD5, and NTLM. * + * @moduleGraph * @since 9 */ module java.security.sasl { diff --git a/jdk/src/java.smartcardio/share/classes/module-info.java b/jdk/src/java.smartcardio/share/classes/module-info.java index 1b3f717e374..ece968cc733 100644 --- a/jdk/src/java.smartcardio/share/classes/module-info.java +++ b/jdk/src/java.smartcardio/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the Java Smart Card I/O API. * + * @moduleGraph * @since 9 */ module java.smartcardio { diff --git a/jdk/src/java.sql.rowset/share/classes/module-info.java b/jdk/src/java.sql.rowset/share/classes/module-info.java index 5ba5fc96ecd..02413903f9c 100644 --- a/jdk/src/java.sql.rowset/share/classes/module-info.java +++ b/jdk/src/java.sql.rowset/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the JDBC RowSet API. * + * @moduleGraph * @since 9 */ module java.sql.rowset { diff --git a/jdk/src/java.sql/share/classes/module-info.java b/jdk/src/java.sql/share/classes/module-info.java index 9f3c08106c1..1e232ec122e 100644 --- a/jdk/src/java.sql/share/classes/module-info.java +++ b/jdk/src/java.sql/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the JDBC API. * + * @moduleGraph * @since 9 */ module java.sql { diff --git a/jdk/src/java.transaction/share/classes/module-info.java b/jdk/src/java.transaction/share/classes/module-info.java index 4b4d76a265a..1a3a1926248 100644 --- a/jdk/src/java.transaction/share/classes/module-info.java +++ b/jdk/src/java.transaction/share/classes/module-info.java @@ -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) diff --git a/jdk/src/java.xml.crypto/share/classes/module-info.java b/jdk/src/java.xml.crypto/share/classes/module-info.java index ad2f50e9570..4e7db6b7579 100644 --- a/jdk/src/java.xml.crypto/share/classes/module-info.java +++ b/jdk/src/java.xml.crypto/share/classes/module-info.java @@ -24,8 +24,9 @@ */ /** - * Defines an API for XML cryptography. + * Defines the API for XML cryptography. * + * @moduleGraph * @since 9 */ module java.xml.crypto { diff --git a/jdk/src/jdk.attach/share/classes/module-info.java b/jdk/src/jdk.attach/share/classes/module-info.java index c23210ab3e8..29f0cd67a7f 100644 --- a/jdk/src/jdk.attach/share/classes/module-info.java +++ b/jdk/src/jdk.attach/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the attach API. * + * @moduleGraph * @since 9 */ module jdk.attach { diff --git a/jdk/src/jdk.charsets/share/classes/module-info.java b/jdk/src/jdk.charsets/share/classes/module-info.java index 6e8cfc36441..8d40e575d30 100644 --- a/jdk/src/jdk.charsets/share/classes/module-info.java +++ b/jdk/src/jdk.charsets/share/classes/module-info.java @@ -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; diff --git a/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java b/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java index 487df00c299..82c2cde442e 100644 --- a/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java +++ b/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * The SunPKCS11 security provider. * + * @moduleGraph * @since 9 */ module jdk.crypto.cryptoki { diff --git a/jdk/src/jdk.crypto.ec/share/classes/module-info.java b/jdk/src/jdk.crypto.ec/share/classes/module-info.java index 74601fa8faf..54f22b68609 100644 --- a/jdk/src/jdk.crypto.ec/share/classes/module-info.java +++ b/jdk/src/jdk.crypto.ec/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * The SunEC security provider. * + * @moduleGraph * @since 9 */ module jdk.crypto.ec { diff --git a/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java b/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java index 20222f45122..0121f613e5e 100644 --- a/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java +++ b/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java @@ -26,6 +26,7 @@ /** * The SunMSCAPI security provider. * + * @moduleGraph * @since 9 */ module jdk.crypto.mscapi { diff --git a/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java b/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java index 21d8a6686a2..3d96987b3c5 100644 --- a/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java +++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java @@ -26,6 +26,7 @@ /** * The OracleUCrypto security provider. * + * @moduleGraph * @since 9 */ module jdk.crypto.ucrypto { diff --git a/jdk/src/jdk.httpserver/share/classes/module-info.java b/jdk/src/jdk.httpserver/share/classes/module-info.java index b01a3870d79..e6c7173e8db 100644 --- a/jdk/src/jdk.httpserver/share/classes/module-info.java +++ b/jdk/src/jdk.httpserver/share/classes/module-info.java @@ -23,6 +23,12 @@ * questions. */ +/** + * Defines the JDK-specific API for HTTP server. + * + * @moduleGraph + * @since 9 + */ module jdk.httpserver { exports com.sun.net.httpserver; diff --git a/jdk/src/jdk.jartool/share/classes/module-info.java b/jdk/src/jdk.jartool/share/classes/module-info.java index 536ca81b684..d852ee780d3 100644 --- a/jdk/src/jdk.jartool/share/classes/module-info.java +++ b/jdk/src/jdk.jartool/share/classes/module-info.java @@ -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; diff --git a/jdk/src/jdk.jcmd/share/classes/module-info.java b/jdk/src/jdk.jcmd/share/classes/module-info.java index 5edf30cec80..4cda0283f1b 100644 --- a/jdk/src/jdk.jcmd/share/classes/module-info.java +++ b/jdk/src/jdk.jcmd/share/classes/module-info.java @@ -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; diff --git a/jdk/src/jdk.jconsole/share/classes/module-info.java b/jdk/src/jdk.jconsole/share/classes/module-info.java index 327af1e1066..7e1841a9bea 100644 --- a/jdk/src/jdk.jconsole/share/classes/module-info.java +++ b/jdk/src/jdk.jconsole/share/classes/module-info.java @@ -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; diff --git a/jdk/src/jdk.jdi/share/classes/module-info.java b/jdk/src/jdk.jdi/share/classes/module-info.java index e2cb439d8c0..e0ea5a5e416 100644 --- a/jdk/src/jdk.jdi/share/classes/module-info.java +++ b/jdk/src/jdk.jdi/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Defines the Java Debugger Interface. * + * @moduleGraph * @since 9 */ module jdk.jdi { diff --git a/jdk/src/jdk.jdwp.agent/share/classes/module-info.java b/jdk/src/jdk.jdwp.agent/share/classes/module-info.java index b78275fab92..82d4c86056a 100644 --- a/jdk/src/jdk.jdwp.agent/share/classes/module-info.java +++ b/jdk/src/jdk.jdwp.agent/share/classes/module-info.java @@ -26,6 +26,7 @@ /** * Java Debug Wire Protocol. * + * @moduleGraph * @since 9 */ module jdk.jdwp.agent { diff --git a/jdk/src/jdk.jlink/share/classes/module-info.java b/jdk/src/jdk.jlink/share/classes/module-info.java index 00140adb802..510b4ac0bb1 100644 --- a/jdk/src/jdk.jlink/share/classes/module-info.java +++ b/jdk/src/jdk.jlink/share/classes/module-info.java @@ -23,6 +23,12 @@ * questions. */ +/** + * Defines the Java linker tool, jlink. + * + * @moduleGraph + * @since 9 + */ module jdk.jlink { requires jdk.internal.opt; requires jdk.jdeps; diff --git a/jdk/src/jdk.jsobject/share/classes/module-info.java b/jdk/src/jdk.jsobject/share/classes/module-info.java index b8f6a2db16b..ac69396a3e5 100644 --- a/jdk/src/jdk.jsobject/share/classes/module-info.java +++ b/jdk/src/jdk.jsobject/share/classes/module-info.java @@ -23,6 +23,12 @@ * questions. */ +/** + * Defines the API for the JavaScript Object. + * + * @moduleGraph + * @since 9 + */ module jdk.jsobject { requires java.desktop; exports netscape.javascript; diff --git a/jdk/src/jdk.jstatd/share/classes/module-info.java b/jdk/src/jdk.jstatd/share/classes/module-info.java index 67f3ec0770f..b3e3195c262 100644 --- a/jdk/src/jdk.jstatd/share/classes/module-info.java +++ b/jdk/src/jdk.jstatd/share/classes/module-info.java @@ -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 @@ module jdk.jstatd { provides sun.jvmstat.monitor.MonitoredHostService with sun.jvmstat.perfdata.monitor.protocol.rmi.MonitoredHostRmiService; } - diff --git a/jdk/src/jdk.localedata/share/classes/module-info.java b/jdk/src/jdk.localedata/share/classes/module-info.java index 324e14b928f..ac27dc329c5 100644 --- a/jdk/src/jdk.localedata/share/classes/module-info.java +++ b/jdk/src/jdk.localedata/share/classes/module-info.java @@ -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, diff --git a/jdk/src/jdk.management.agent/share/classes/module-info.java b/jdk/src/jdk.management.agent/share/classes/module-info.java index 0afeaf0ccd6..81bccdb0e2b 100644 --- a/jdk/src/jdk.management.agent/share/classes/module-info.java +++ b/jdk/src/jdk.management.agent/share/classes/module-info.java @@ -23,6 +23,12 @@ * questions. */ +/** + * Define the JMX management agent. + * + * @moduleGraph + * @since 9 + */ module jdk.management.agent { requires java.management; requires java.management.rmi; diff --git a/jdk/src/jdk.management/share/classes/module-info.java b/jdk/src/jdk.management/share/classes/module-info.java index 327d31ebda8..bea31ddcadb 100644 --- a/jdk/src/jdk.management/share/classes/module-info.java +++ b/jdk/src/jdk.management/share/classes/module-info.java @@ -23,6 +23,12 @@ * questions. */ +/** + * Defines the JDK-specific Management Interfaces for JVM. + * + * @moduleGraph + * @since 9 + */ module jdk.management { requires transitive java.management; diff --git a/jdk/src/jdk.naming.dns/share/classes/module-info.java b/jdk/src/jdk.naming.dns/share/classes/module-info.java index abe26ec2644..71d3725440a 100644 --- a/jdk/src/jdk.naming.dns/share/classes/module-info.java +++ b/jdk/src/jdk.naming.dns/share/classes/module-info.java @@ -23,6 +23,12 @@ * questions. */ +/** + * DNS Java Naming provider. + * + * @moduleGraph + * @since 9 + */ module jdk.naming.dns { requires java.naming; diff --git a/jdk/src/jdk.naming.rmi/share/classes/module-info.java b/jdk/src/jdk.naming.rmi/share/classes/module-info.java index debe6409103..bba4557c935 100644 --- a/jdk/src/jdk.naming.rmi/share/classes/module-info.java +++ b/jdk/src/jdk.naming.rmi/share/classes/module-info.java @@ -23,6 +23,12 @@ * questions. */ +/** + * RMI Java Naming provider. + * + * @moduleGraph + * @since 9 + */ module jdk.naming.rmi { requires java.naming; requires java.rmi; diff --git a/jdk/src/jdk.net/share/classes/module-info.java b/jdk/src/jdk.net/share/classes/module-info.java index 95fb57915a8..e5ed160d74b 100644 --- a/jdk/src/jdk.net/share/classes/module-info.java +++ b/jdk/src/jdk.net/share/classes/module-info.java @@ -23,6 +23,12 @@ * questions. */ +/** + * Defines the JDK-specific Networking API. + * + * @moduleGraph + * @since 9 + */ module jdk.net { exports jdk.net; } diff --git a/jdk/src/jdk.sctp/share/classes/module-info.java b/jdk/src/jdk.sctp/share/classes/module-info.java index c52ceb5c8c2..f150ed25fc6 100644 --- a/jdk/src/jdk.sctp/share/classes/module-info.java +++ b/jdk/src/jdk.sctp/share/classes/module-info.java @@ -23,6 +23,12 @@ * questions. */ +/** + * Defines the JDK-specific API for SCTP. + * + * @moduleGraph + * @since 9 + */ module jdk.sctp { exports com.sun.nio.sctp; } diff --git a/jdk/src/jdk.security.auth/share/classes/module-info.java b/jdk/src/jdk.security.auth/share/classes/module-info.java index 1f6eea6537b..59e9f996aaf 100644 --- a/jdk/src/jdk.security.auth/share/classes/module-info.java +++ b/jdk/src/jdk.security.auth/share/classes/module-info.java @@ -27,6 +27,7 @@ * Contains the implementation of the javax.security.auth.* interfaces and * various authentication modules. * + * @moduleGraph * @since 9 */ module jdk.security.auth { diff --git a/jdk/src/jdk.security.jgss/share/classes/module-info.java b/jdk/src/jdk.security.jgss/share/classes/module-info.java index f43fdd49296..3e4d520d0a4 100644 --- a/jdk/src/jdk.security.jgss/share/classes/module-info.java +++ b/jdk/src/jdk.security.jgss/share/classes/module-info.java @@ -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 { diff --git a/jdk/src/jdk.zipfs/share/classes/module-info.java b/jdk/src/jdk.zipfs/share/classes/module-info.java index 5b7275e0ccb..bcd281f459a 100644 --- a/jdk/src/jdk.zipfs/share/classes/module-info.java +++ b/jdk/src/jdk.zipfs/share/classes/module-info.java @@ -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; }