changeset 59304:5d477a977ce5

8234746: Improve indexing of system properties Reviewed-by: hannesw, jjg
author prappo
date Wed, 11 Dec 2019 15:16:21 +0000
parents d87f6de9a63a
children 0d33d0db0c96
files src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java test/langtools/jdk/javadoc/doclet/testIndex/TestIndex.java test/langtools/jdk/javadoc/doclet/testModules/TestModules.java test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/TestSystemPropertyTaglet.java test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/module-info.java test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyAnnotation.java test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyClass.java test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyEnum.java test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyError.java test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyException.java test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyInterface.java test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/package-info.java
diffstat 13 files changed, 554 insertions(+), 116 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java	Wed Dec 11 16:13:59 2019 +0100
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java	Wed Dec 11 15:16:21 2019 +0000
@@ -29,6 +29,9 @@
 
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.ModuleElement;
+import javax.lang.model.element.PackageElement;
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.element.VariableElement;
 import javax.lang.model.type.TypeMirror;
@@ -107,14 +110,14 @@
         CommentHelper ch = utils.getCommentHelper(element);
         IndexTree itt = (IndexTree)tag;
 
-        String tagText =  ch.getText(itt.getSearchTerm());
+        String tagText = ch.getText(itt.getSearchTerm());
         if (tagText.charAt(0) == '"' && tagText.charAt(tagText.length() - 1) == '"') {
             tagText = tagText.substring(1, tagText.length() - 1)
                              .replaceAll("\\s+", " ");
         }
         String desc = ch.getText(itt.getDescription());
 
-        return createAnchorAndSearchIndex(element, tagText,desc);
+        return createAnchorAndSearchIndex(element, tagText, desc);
     }
 
     /**
@@ -413,14 +416,14 @@
     }
 
     @SuppressWarnings("preview")
-    private Content createAnchorAndSearchIndex(Element element, String tagText, String desc){
+    private Content createAnchorAndSearchIndex(Element element, String tagText, String desc) {
         Content result = null;
         if (isFirstSentence && inSummary) {
             result = new StringContent(tagText);
         } else {
             String anchorName = htmlWriter.links.getName(tagText);
-            int count = htmlWriter.indexAnchorTable.computeIfAbsent(anchorName, s -> 0);
-            htmlWriter.indexAnchorTable.put(anchorName, count + 1);
+            int count = htmlWriter.indexAnchorTable
+                    .compute(anchorName, (k, v) -> v == null ? 0 : v + 1);
             if (count > 0) {
                 anchorName += "-" + count;
             }
@@ -430,12 +433,40 @@
                 si.setLabel(tagText);
                 si.setDescription(desc);
                 si.setUrl(htmlWriter.path.getPath() + "#" + anchorName);
-                DocPaths docPaths = configuration.docPaths;
                 new SimpleElementVisitor14<Void, Void>() {
+
+                    @Override
+                    public Void visitModule(ModuleElement e, Void p) {
+                        si.setHolder(resources.getText("doclet.module")
+                                             + " " + utils.getFullyQualifiedName(e));
+                        return null;
+                    }
+
+                    @Override
+                    public Void visitPackage(PackageElement e, Void p) {
+                        si.setHolder(resources.getText("doclet.package")
+                                             + " " + utils.getFullyQualifiedName(e));
+                        return null;
+                    }
+
+                    @Override
+                    public Void visitType(TypeElement e, Void p) {
+                        si.setHolder(utils.getTypeElementName(e, true)
+                                             + " " + utils.getFullyQualifiedName(e));
+                        return null;
+                    }
+
+                    @Override
+                    public Void visitExecutable(ExecutableElement e, Void p) {
+                        si.setHolder(utils.getFullyQualifiedName(utils.getEnclosingTypeElement(e))
+                                             + "." + utils.getSimpleName(e) + utils.flatSignature(e));
+                        return null;
+                    }
+
                     @Override
                     public Void visitVariable(VariableElement e, Void p) {
                         TypeElement te = utils.getEnclosingTypeElement(e);
-                        si.setHolder(utils.getFullyQualifiedName(e) + "." + utils.getSimpleName(e));
+                        si.setHolder(utils.getFullyQualifiedName(te) + "." + utils.getSimpleName(e));
                         return null;
                     }
 
--- a/test/langtools/jdk/javadoc/doclet/testIndex/TestIndex.java	Wed Dec 11 16:13:59 2019 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testIndex/TestIndex.java	Wed Dec 11 15:16:21 2019 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4852280 4517115 4973608 4994589 8026567 8071982 8196202
+ * @bug      4852280 4517115 4973608 4994589 8026567 8071982 8196202 8234746
  * @summary  Perform tests on index.html file.
  *           Also test that index-all.html has the appropriate output.
  *           Test for unnamed package in index.
@@ -74,6 +74,6 @@
                 + "<dd>&nbsp;</dd>\n"
                 + "</dl>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/Coin.html#Enum\">Enum</a>"
-                + "</span> - Search tag in pkg.Coin</dt>");
+                + "</span> - Search tag in enum pkg.Coin</dt>");
     }
 }
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Wed Dec 11 16:13:59 2019 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java	Wed Dec 11 15:16:21 2019 +0000
@@ -26,8 +26,8 @@
  * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363
  *      8168766 8168688 8162674 8160196 8175799 8174974 8176778 8177562 8175218
  *      8175823 8166306 8178043 8181622 8183511 8169819 8074407 8183037 8191464
-        8164407 8192007 8182765 8196200 8196201 8196202 8196202 8205593 8202462
-        8184205 8219060 8223378
+ *      8164407 8192007 8182765 8196200 8196201 8196202 8196202 8205593 8202462
+ *      8184205 8219060 8223378 8234746
  * @summary Test modules support in javadoc.
  * @library ../../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -901,18 +901,18 @@
                 + "</dl>",
                 "<dl>\n"
                 + "<dt><span class=\"searchTagLink\"><a href=\"moduleB/module-summary.html#search_word\">"
-                + "search_word</a></span> - Search tag in moduleB</dt>\n"
+                + "search_word</a></span> - Search tag in module moduleB</dt>\n"
                 + "<dd>&nbsp;</dd>\n"
                 + "<dt><span class=\"searchTagLink\"><a href=\"moduleA/module-summary.html#searchphrase\">"
-                + "search phrase</a></span> - Search tag in moduleA</dt>\n"
+                + "search phrase</a></span> - Search tag in module moduleA</dt>\n"
                 + "<dd>with description</dd>\n"
                 + "</dl>");
         checkOutput("index-all.html", false,
                 "<dt><span class=\"searchTagLink\"><a href=\"moduleA/module-summary.html#searchphrase\">"
-                + "search phrase</a></span> - Search tag in moduleA</dt>\n"
+                + "search phrase</a></span> - Search tag in module moduleA</dt>\n"
                 + "<dd>with description</dd>\n"
                 + "<dt><span class=\"searchTagLink\"><a href=\"moduleA/module-summary.html#searchphrase\">"
-                + "search phrase</a></span> - Search tag in moduleA</dt>\n"
+                + "search phrase</a></span> - Search tag in module moduleA</dt>\n"
                 + "<dd>with description</dd>");
     }
 
--- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Wed Dec 11 16:13:59 2019 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Wed Dec 11 15:16:21 2019 +0000
@@ -25,7 +25,7 @@
  * @test
  * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881
  *      8181622 8182263 8074407 8187521 8198522 8182765 8199278 8196201 8196202
- *      8184205 8214468 8222548 8223378
+ *      8184205 8214468 8222548 8223378 8234746
  * @summary Test the search feature of javadoc.
  * @library ../../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -393,31 +393,31 @@
         // Test for search tags markup in index file.
         checkOutput("index-all.html", expectedOutput,
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
-                + "phrase with spaces</a></span> - Search tag in pkg</dt>",
+                + "phrase with spaces</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">"
-                + "pkg</a></span> - Search tag in pkg</dt>",
+                + "pkg</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">"
-                + "pkg2.5</a></span> - Search tag in pkg</dt>",
+                + "pkg2.5</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">"
-                + "r</a></span> - Search tag in pkg</dt>",
+                + "r</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
-                + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
+                + "search phrase</a></span> - Search tag in class pkg1.RegClass</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
                 + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
-                + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
+                + "search phrase with desc deprecated</a></span> - Search tag in annotation type pkg2.TestAnnotationType</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
-                + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
+                + "SearchTagDeprecatedClass</a></span> - Search tag in class pkg2.TestClass</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
                 + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
                 + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
-                + "SingleWord</a></span> - Search tag in pkg</dt>",
+                + "SingleWord</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html"
                 + "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - "
                 + "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>",
@@ -443,35 +443,35 @@
         // Test for search tags markup in split index file.
         checkOutput("index-files/index-13.html", true,
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#searchphrase\">"
-                + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
+                + "search phrase</a></span> - Search tag in class pkg1.RegClass</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#SearchWordWithDescription\">"
                 + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
-                + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
+                + "search phrase with desc deprecated</a></span> - Search tag in annotation type pkg2.TestAnnotationType</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestClass.html#SearchTagDeprecatedClass\">"
-                + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
+                + "SearchTagDeprecatedClass</a></span> - Search tag in class pkg2.TestClass</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">"
                 + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">"
                 + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#SingleWord\">"
-                + "SingleWord</a></span> - Search tag in pkg</dt>",
+                + "SingleWord</a></span> - Search tag in package pkg</dt>",
                 "<br><a href=\"../allclasses-index.html\">All&nbsp;Classes</a>&nbsp;"
                 + "<a href=\"../allpackages-index.html\">All&nbsp;Packages</a>");
         checkOutput("index-files/index-10.html", true,
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#phrasewithspaces\">"
-                + "phrase with spaces</a></span> - Search tag in pkg</dt>",
+                + "phrase with spaces</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg\">"
-                + "pkg</a></span> - Search tag in pkg</dt>",
+                + "pkg</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg2.5\">"
-                + "pkg2.5</a></span> - Search tag in pkg</dt>");
+                + "pkg2.5</a></span> - Search tag in package pkg</dt>");
         checkOutput("index-files/index-12.html", true,
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#r\">"
-                + "r</a></span> - Search tag in pkg</dt>");
+                + "r</a></span> - Search tag in package pkg</dt>");
         checkOutput("index-files/index-8.html", true,
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html"
                 + "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - "
@@ -497,23 +497,23 @@
         // Test for search tags markup in index file when javadoc is executed with -nocomment.
         checkOutput("index-all.html", false,
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
-                + "phrase with spaces</a></span> - Search tag in pkg</dt>",
+                + "phrase with spaces</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">"
-                + "pkg</a></span> - Search tag in pkg</dt>",
+                + "pkg</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">"
-                + "pkg2.5</a></span> - Search tag in pkg</dt>",
+                + "pkg2.5</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">"
-                + "r</a></span> - Search tag in pkg</dt>",
+                + "r</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
-                + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
+                + "search phrase</a></span> - Search tag in class pkg1.RegClass</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
                 + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
-                + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
+                + "search phrase with desc deprecated</a></span> - Search tag in annotation type pkg2.TestAnnotationType</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
-                + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
+                + "SearchTagDeprecatedClass</a></span> - Search tag in class pkg2.TestClass</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
-                + "SingleWord</a></span> - Search tag in pkg</dt>",
+                + "SingleWord</a></span> - Search tag in package pkg</dt>",
                 "<div class=\"deprecationComment\">class_test1 passes. Search tag"
                 + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></div>",
                 "<div class=\"deprecationComment\">error_test3 passes. Search tag for\n"
@@ -522,29 +522,29 @@
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
                 + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>");
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>");
     }
 
     void checkIndexNoDeprecated() {
         // Test for search tags markup in index file when javadoc is executed using -nodeprecated.
         checkOutput("index-all.html", true,
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
-                + "phrase with spaces</a></span> - Search tag in pkg</dt>",
+                + "phrase with spaces</a></span> - Search tag in package pkg</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
-                + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
+                + "search phrase</a></span> - Search tag in class pkg1.RegClass</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
                 + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
-                + "SingleWord</a></span> - Search tag in pkg</dt>");
+                + "SingleWord</a></span> - Search tag in package pkg</dt>");
         checkOutput("index-all.html", false,
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
-                + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
+                + "search phrase with desc deprecated</a></span> - Search tag in annotation type pkg2.TestAnnotationType</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
-                + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
+                + "SearchTagDeprecatedClass</a></span> - Search tag in class pkg2.TestClass</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
                 + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>",
                 "<div class=\"deprecationComment\">class_test1 passes. Search tag"
                 + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></div>",
                 "<div class=\"deprecationComment\">error_test3 passes. Search tag for\n"
@@ -629,14 +629,14 @@
         // Test for search tags duplication in index file.
         checkOutput("index-all.html", true,
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>\n"
                 + "<dd>with description</dd>");
         checkOutput("index-all.html", false,
                 "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>\n"
                 + "<dd>with description</dd>\n"
                 + "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>\n"
                 + "<dd>with description</dd>");
     }
 
@@ -644,14 +644,14 @@
         // Test for search tags duplication in index file.
         checkOutput("index-files/index-13.html", true,
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>\n"
                 + "<dd>with description</dd>");
         checkOutput("index-files/index-13.html", false,
                 "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>\n"
                 + "<dd>with description</dd>\n"
                 + "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
-                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n"
+                + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError.TestError()</dt>\n"
                 + "<dd>with description</dd>");
     }
 
--- a/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/TestSystemPropertyTaglet.java	Wed Dec 11 16:13:59 2019 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/TestSystemPropertyTaglet.java	Wed Dec 11 15:16:21 2019 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 5076751
+ * @bug 5076751 8234746
  * @summary System properties documentation needed in javadocs
  * @library /tools/lib ../../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -31,7 +31,6 @@
  * @run main TestSystemPropertyTaglet
  */
 
-
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
@@ -56,50 +55,167 @@
 
     @Test
     public void test(Path base) throws Exception {
-        Path srcDir = base.resolve("src");
-        Path outDir = base.resolve("out");
-
-        MethodBuilder method = MethodBuilder
-                .parse("public void func(A a) {}")
-                .setComments("test with {@systemProperty java.version}");
-
-        new ClassBuilder(tb, "pkg.A")
-                .setComments("test with {@systemProperty user.name}")
-                .setModifiers("public", "class")
-                .addMembers(method)
-                .write(srcDir);
-
-        javadoc("-d", outDir.toString(),
-                "-sourcepath", srcDir.toString(),
-                "pkg");
+        javadoc("-d", base.resolve("out").toString(),
+                "--module-source-path", testSrc,
+                "--module", "mymodule");
 
         checkExit(Exit.OK);
 
-        checkOrder("pkg/A.html",
-                "<h1 title=\"Class A\" class=\"title\">Class A</h1>",
-                "test with <code><a id=\"user.name\" class=\"searchTagResult\">user.name</a></code>",
-                "<h2>Method Details</h2>",
-                "test with <code><a id=\"java.version\" class=\"searchTagResult\">java.version</a></code>");
+        checkOrder("mymodule/mypackage/MyAnnotation.html",
+                   "<h1 title=\"Annotation Type MyAnnotation\" class=\"title\">Annotation Type MyAnnotation</h1>",
+                   "(annotation) the <code><a id=\"test.property\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "<h2>Element Details</h2>",
+                   "(annotation/method) the <code><a id=\"test.property-1\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "");
+
+        checkOrder("mymodule/mypackage/MyClass.html",
+                   "<h1 title=\"Class MyClass\" class=\"title\">Class MyClass</h1>",
+                   "(class) the <code><a id=\"test.property\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "<h2>Field Details</h2>",
+                   "(class/field) the <code><a id=\"test.property-1\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "(class/static-field) the <code><a id=\"test.property-2\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "<h2>Constructor Details</h2>",
+                   "(class/constructor) the <code><a id=\"test.property-3\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "<h2>Method Details</h2>",
+                   "(class/static-method) the <code><a id=\"test.property-4\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "(class/method) the <code><a id=\"test.property-5\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "");
+
+        checkOrder("mymodule/mypackage/MyEnum.html",
+                   "<h1 title=\"Enum MyEnum\" class=\"title\">Enum MyEnum</h1>",
+                   "(enum) the <code><a id=\"test.property\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "<h2>Enum Constant Details</h2>",
+                   "(enum/constant) the <code><a id=\"test.property-1\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "");
+
+        checkOrder("mymodule/mypackage/MyError.html",
+                   "<h1 title=\"Class MyError\" class=\"title\">Class MyError</h1>",
+                   "(error) the <code><a id=\"test.property\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "<h2>Constructor Details</h2>",
+                   "(error/constructor) the <code><a id=\"test.property-1\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "");
+
+        checkOrder("mymodule/mypackage/MyException.html",
+                   "<h1 title=\"Class MyException\" class=\"title\">Class MyException</h1>",
+                   "(exception) the <code><a id=\"test.property\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "<h2>Constructor Details</h2>",
+                   "(exception/constructor) the <code><a id=\"test.property-1\" class=\"searchTagResult\">test.property</a></code>",
+                   "");
+
+        checkOrder("mymodule/mypackage/MyInterface.html",
+                   "<h1 title=\"Interface MyInterface\" class=\"title\">Interface MyInterface</h1>",
+                   "(interface) the <code><a id=\"test.property\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "<h2>Field Details</h2>",
+                   "(interface/constant) the <code><a id=\"test.property-1\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "<h2>Method Details</h2>",
+                   "(interface/method-1) the <code><a id=\"test.property-2\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "(interface/method-2) the <code><a id=\"test.property-3\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "");
+
+        checkOrder("mymodule/module-summary.html",
+                   "<h1 title=\"Module\" class=\"title\">Module&nbsp;mymodule</h1>",
+                   "(module) the <code><a id=\"test.property\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "");
+
+        checkOrder("mymodule/mypackage/package-summary.html",
+                   "<h1 title=\"Package\" class=\"title\">Package&nbsp;mypackage</h1>",
+                   "(package) the <code><a id=\"test.property\" class=\"searchTagResult\">test.property</a></code> system property.",
+                   "");
 
         checkOrder("index-all.html",
-                "<h2 class=\"title\">J</h2>",
-                "<dt><span class=\"searchTagLink\"><a href=\"pkg/A.html#java.version\">java.version</a>"
-                + "</span> - Search tag in pkg.A</dt>\n<dd>System Property</dd>",
-                "<h2 class=\"title\">U</h2>",
-                "<dt><span class=\"searchTagLink\"><a href=\"pkg/A.html#user.name\">user.name</a></span>"
-                + " - Search tag in pkg.A</dt>\n<dd>System Property</dd>");
+                   "<h2 class=\"title\">T</h2>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyAnnotation.html#test.property\">test.property</a></span>" +
+                           " - Search tag in annotation type mypackage.MyAnnotation</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyClass.html#test.property\">test.property</a></span>" +
+                           " - Search tag in class mypackage.MyClass</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyEnum.html#test.property\">test.property</a></span>" +
+                           " - Search tag in enum mypackage.MyEnum</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyError.html#test.property\">test.property</a></span>" +
+                           " - Search tag in error mypackage.MyError</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyException.html#test.property\">test.property</a></span>" +
+                           " - Search tag in exception mypackage.MyException</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyInterface.html#test.property\">test.property</a></span>" +
+                           " - Search tag in interface mypackage.MyInterface</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/module-summary.html#test.property\">test.property</a></span>" +
+                           " - Search tag in module mymodule</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyAnnotation.html#test.property-1\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyAnnotation.value()</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyClass.html#test.property-2\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyClass.INT_CONSTANT</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyClass.html#test.property-3\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyClass.MyClass()</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyClass.html#test.property-1\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyClass.intField</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyClass.html#test.property-5\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyClass.run()</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyClass.html#test.property-4\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyClass.value()</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyEnum.html#test.property-1\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyEnum.X</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyEnum.html#test.property-2\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyEnum.m()</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyError.html#test.property-1\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyError.MyError()</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyException.html#test.property-1\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyException.MyException()</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyInterface.html#test.property-1\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyInterface.INT_CONSTANT</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyInterface.html#test.property-2\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyInterface.m()</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/MyInterface.html#test.property-3\">test.property</a></span>" +
+                           " - Search tag in mypackage.MyInterface.m(String...)</dt>\n<dd>System Property</dd>",
+                   "<dt><span class=\"searchTagLink\"><a href=\"mymodule/mypackage/package-summary.html#test.property\">test.property</a></span>" +
+                           " - Search tag in package mypackage</dt>\n<dd>System Property</dd>",
+                   "");
 
         checkOutput("tag-search-index.js", true,
-                "{\"l\":\"java.version\",\"h\":\"pkg.A\",\"d\":\"System Property\","
-                + "\"u\":\"pkg/A.html#java.version\"}");
-
-        checkOutput("tag-search-index.js", true,
-                "{\"l\":\"user.name\",\"h\":\"pkg.A\",\"d\":\"System Property\","
-                + "\"u\":\"pkg/A.html#user.name\"}");
+                    "{\"l\":\"test.property\",\"h\":\"annotation type mypackage.MyAnnotation\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyAnnotation.html#test.property\"}",
+                    "{\"l\":\"test.property\",\"h\":\"class mypackage.MyClass\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyClass.html#test.property\"}",
+                    "{\"l\":\"test.property\",\"h\":\"enum mypackage.MyEnum\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyEnum.html#test.property\"}",
+                    "{\"l\":\"test.property\",\"h\":\"error mypackage.MyError\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyError.html#test.property\"}",
+                    "{\"l\":\"test.property\",\"h\":\"exception mypackage.MyException\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyException.html#test.property\"}",
+                    "{\"l\":\"test.property\",\"h\":\"interface mypackage.MyInterface\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyInterface.html#test.property\"}",
+                    "{\"l\":\"test.property\",\"h\":\"module mymodule\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/module-summary.html#test.property\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyAnnotation.value()\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyAnnotation.html#test.property-1\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyClass.INT_CONSTANT\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyClass.html#test.property-2\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyClass.MyClass()\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyClass.html#test.property-3\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyClass.intField\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyClass.html#test.property-1\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyClass.run()\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyClass.html#test.property-5\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyClass.value()\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyClass.html#test.property-4\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyEnum.X\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyEnum.html#test.property-1\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyEnum.m()\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyEnum.html#test.property-2\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyError.MyError()\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyError.html#test.property-1\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyException.MyException()\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyException.html#test.property-1\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyInterface.INT_CONSTANT\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyInterface.html#test.property-1\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyInterface.m()\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyInterface.html#test.property-2\"}",
+                    "{\"l\":\"test.property\",\"h\":\"mypackage.MyInterface.m(String...)\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/MyInterface.html#test.property-3\"}",
+                    "{\"l\":\"test.property\",\"h\":\"package mypackage\"" +
+                            ",\"d\":\"System Property\",\"u\":\"mymodule/mypackage/package-summary.html#test.property\"}",
+                    "");
     }
 
     @Test
-    public void testSystemProperytWithinATag(Path base) throws Exception {
+    public void testSystemPropertyWithinATag(Path base) throws Exception {
         Path srcDir = base.resolve("src");
         Path outDir = base.resolve("out");
 
@@ -118,27 +234,4 @@
         checkOutput(Output.OUT, true,
                 "warning: {@systemProperty} tag, which expands to <a>, within <a>");
     }
-
-    @Test
-    public void testDuplicateReferences(Path base) throws Exception {
-        Path srcDir = base.resolve("src");
-        Path outDir = base.resolve("out");
-
-        new ClassBuilder(tb, "pkg.A")
-                .setModifiers("public", "class")
-                .setComments("This is a class. Here is {@systemProperty foo}.")
-                .addMembers(MethodBuilder.parse("public void m() {}")
-                        .setComments("This is a method. Here is {@systemProperty foo}."))
-                .write(srcDir);
-
-        javadoc("-d", outDir.toString(),
-                "-sourcepath", srcDir.toString(),
-                "pkg");
-
-        checkExit(Exit.OK);
-
-        checkOutput("pkg/A.html", true,
-                "This is a class. Here is <code><a id=\"foo\" class=\"searchTagResult\">foo</a></code>.",
-                "This is a method. Here is <code><a id=\"foo-1\" class=\"searchTagResult\">foo</a></code>.");
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/module-info.java	Wed Dec 11 15:16:21 2019 +0000
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2019, 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.
+ *
+ * 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.
+ */
+
+/**
+ * (module) the {@systemProperty test.property} system property.
+ */
+module mymodule {
+    exports mypackage;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyAnnotation.java	Wed Dec 11 15:16:21 2019 +0000
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2019, 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.
+ *
+ * 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 mypackage;
+
+/**
+ * (annotation) the {@systemProperty test.property} system property.
+ */
+public @interface MyAnnotation {
+
+    /**
+     * (annotation/method) the {@systemProperty test.property} system property.
+     *
+     * @return the MyEnum
+     */
+    MyEnum value() default MyEnum.X;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyClass.java	Wed Dec 11 15:16:21 2019 +0000
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2019, 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.
+ *
+ * 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 mypackage;
+
+/**
+ * (class) the {@systemProperty test.property} system property.
+ */
+public class MyClass {
+
+    /**
+     * (class/field) the {@systemProperty test.property} system property.
+     */
+    public int intField;
+
+    /**
+     * (class/static-field) the {@systemProperty test.property} system property.
+     */
+    public final static int INT_CONSTANT = 42;
+
+    /**
+     * (class/static-method) the {@systemProperty test.property} system property.
+     *
+     * @return an integer, 42
+     */
+    public static Object value() { return INT_CONSTANT; }
+
+    /**
+     * (class/constructor) the {@systemProperty test.property} system property.
+     */
+    public MyClass() { }
+
+    /**
+     * (class/method) the {@systemProperty test.property} system property.
+     */
+    public void run() { }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyEnum.java	Wed Dec 11 15:16:21 2019 +0000
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2019, 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.
+ *
+ * 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 mypackage;
+
+/**
+ * (enum) the {@systemProperty test.property} system property.
+ */
+public enum MyEnum {
+
+    /**
+     * (enum/constant) the {@systemProperty test.property} system property.
+     */
+    X {
+        // The mention below will not appear in the javadoc, see JDK-8144631
+
+        /**
+         * (enum/constant-specific-method) the {@systemProperty test.property} system property.
+         */
+        public void m() { }
+    };
+
+    /**
+     * (enum/method) the {@systemProperty test.property} system property.
+     */
+    public void m() { }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyError.java	Wed Dec 11 15:16:21 2019 +0000
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2019, 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.
+ *
+ * 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 mypackage;
+
+/**
+ * (error) the {@systemProperty test.property} system property.
+ */
+public class MyError extends Error {
+
+    /**
+     * (error/constructor) the {@systemProperty test.property} system property.
+     */
+    public MyError() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyException.java	Wed Dec 11 15:16:21 2019 +0000
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2019, 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.
+ *
+ * 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 mypackage;
+
+/**
+ * (exception) the {@systemProperty test.property} system property.
+ */
+public class MyException extends Exception {
+
+    /**
+     * (exception/constructor) the {@systemProperty test.property} system property.
+     */
+    public MyException() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/MyInterface.java	Wed Dec 11 15:16:21 2019 +0000
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2019, 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.
+ *
+ * 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 mypackage;
+
+/**
+ * (interface) the {@systemProperty test.property} system property.
+ */
+public interface MyInterface {
+
+    /**
+     * (interface/constant) the {@systemProperty test.property} system property.
+     */
+    int INT_CONSTANT = 42;
+
+    /**
+     * (interface/method-1) the {@systemProperty test.property} system property.
+     */
+    void m();
+
+    /**
+     * (interface/method-2) the {@systemProperty test.property} system property.
+     *
+     * @param strings
+     */
+    void m(String... strings);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testSystemPropertyTaglet/mymodule/mypackage/package-info.java	Wed Dec 11 15:16:21 2019 +0000
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2019, 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.
+ *
+ * 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) the {@systemProperty test.property} system property.
+ */
+package mypackage;
\ No newline at end of file