8154399: Need replacement for jdk.javadoc/com.sun.tools.doclets.standard.Standard
8159096: Expose (new) Standard doclet class.
Reviewed-by: alanb, erikj, ksrini
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/standard/Standard.java Tue Jun 21 21:06:54 2016 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/standard/Standard.java Wed Jun 22 17:20:53 2016 -0700
@@ -28,6 +28,11 @@
import com.sun.javadoc.*;
import com.sun.tools.doclets.formats.html.*;
+/**
+ * This doclet generates HTML-formatted documentation for the specified packages and types.
+ * @deprecated The doclet has been superseded by its replacement,
+ * {@code jdk.javadoc.doclets.StandardDoclet}.
+ */
@Deprecated
public class Standard {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/StandardDoclet.java Wed Jun 22 17:20:53 2016 -0700
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2003, 2015, 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 jdk.javadoc.doclets;
+
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet;
+
+/**
+ * This doclet generates HTML-formatted documentation for the specified modules, packages and types.
+ */
+public class StandardDoclet implements Doclet {
+
+ private final HtmlDoclet htmlDoclet;
+
+ public StandardDoclet() {
+ htmlDoclet = new HtmlDoclet();
+ }
+
+ public void init(Locale locale, Reporter reporter) {
+ htmlDoclet.init(locale, reporter);
+ }
+
+ public String getName() {
+ return "Standard";
+ }
+
+ public Set<Doclet.Option> getSupportedOptions() {
+ return htmlDoclet.getSupportedOptions();
+ }
+
+ public SourceVersion getSupportedSourceVersion() {
+ return htmlDoclet.sourceVersion();
+ }
+
+ public boolean run(DocletEnvironment root) {
+ return htmlDoclet.run(root);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/package-info.java Wed Jun 22 17:20:53 2016 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+/**
+ * This package contains standard, supported doclets.
+ */
+package jdk.javadoc.doclets;
+
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/standard/Standard.java Tue Jun 21 21:06:54 2016 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2003, 2015, 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 jdk.javadoc.internal.doclets.standard;
-
-import java.util.Locale;
-import java.util.Set;
-
-import javax.lang.model.SourceVersion;
-
-import jdk.javadoc.doclet.Doclet;
-import jdk.javadoc.doclet.DocletEnvironment;
-import jdk.javadoc.doclet.Reporter;
-import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet;
-
-public class Standard implements Doclet {
-
- private final HtmlDoclet htmlDoclet;
-
- public Standard() {
- htmlDoclet = new HtmlDoclet();
- }
-
- public void init(Locale locale, Reporter reporter) {
- htmlDoclet.init(locale, reporter);
- }
-
- public String getName() {
- return "Standard";
- }
-
- public Set<Doclet.Option> getSupportedOptions() {
- return htmlDoclet.getSupportedOptions();
- }
-
- public SourceVersion getSupportedSourceVersion() {
- return htmlDoclet.sourceVersion();
- }
-
- public boolean run(DocletEnvironment root) {
- return htmlDoclet.run(root);
- }
-}
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java Tue Jun 21 21:06:54 2016 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java Wed Jun 22 17:20:53 2016 -0700
@@ -86,7 +86,7 @@
com.sun.tools.doclets.standard.Standard.class;
private static final Class<?> StdDoclet =
- jdk.javadoc.internal.doclets.standard.Standard.class;
+ jdk.javadoc.doclets.StandardDoclet.class;
/** Context for this invocation. */
private final Context context;
--- a/langtools/src/jdk.javadoc/share/classes/module-info.java Tue Jun 21 21:06:54 2016 +0200
+++ b/langtools/src/jdk.javadoc/share/classes/module-info.java Wed Jun 22 17:20:53 2016 -0700
@@ -30,9 +30,12 @@
exports com.sun.javadoc;
exports com.sun.tools.doclets;
+ exports com.sun.tools.doclets.standard;
exports com.sun.tools.javadoc;
+
exports jdk.javadoc.doclet;
exports jdk.javadoc.doclet.taglet;
+ exports jdk.javadoc.doclets;
provides javax.tools.DocumentationTool
with jdk.javadoc.internal.api.JavadocTool;
--- a/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java Tue Jun 21 21:06:54 2016 +0200
+++ b/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java Wed Jun 22 17:20:53 2016 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8035473 8154482
+ * @bug 8035473 8154482 8154399 8159096
* @summary make sure the javadoc tool responds correctly to Xold,
* old doclets and taglets.
* @library /tools/lib
@@ -87,7 +87,7 @@
CLASS_NAME + "\\$OldTaglet.*");
final static String OLD_STDDOCLET = "com.sun.tools.doclets.standard.Standard";
- final static String NEW_STDDOCLET = "jdk.javadoc.internal.doclets.standard.Standard";
+ final static String NEW_STDDOCLET = "jdk.javadoc.doclets.StandardDoclet";
public EnsureNewOldDoclet() throws Exception {