Skip to content
Permalink
Browse files
8263473: Update annotation terminology (2)
Reviewed-by: hannesw
  • Loading branch information
jonathan-gibbons committed Mar 24, 2021
1 parent 3e751a5 commit 1a13c9ef83f5cc9a58db3a4c5cc6e049bf239396
Show file tree
Hide file tree
Showing 11 changed files with 492 additions and 432 deletions.
@@ -127,6 +127,7 @@ protected Function<String, String> getResourceKeyMapper(DocletEnvironment docEnv
// in standard.properties
{ "doclet.Enum_Hierarchy", "doclet.Enum_Class_Hierarchy" },
{ "doclet.Annotation_Type_Hierarchy", "doclet.Annotation_Interface_Hierarchy" },
{ "doclet.Href_Annotation_Title", "doclet.Href_Annotation_Interface_Title" },
{ "doclet.Href_Enum_Title", "doclet.Href_Enum_Class_Title" },
{ "doclet.Annotation_Types", "doclet.Annotation_Interfaces" },
{ "doclet.Annotation_Type_Members", "doclet.Annotation_Interface_Members" },
@@ -46,6 +46,7 @@ doclet.Annotation_Interface_Hierarchy=Annotation Interface Hierarchy
doclet.Href_Class_Title=class in {0}
doclet.Href_Interface_Title=interface in {0}
doclet.Href_Annotation_Title=annotation in {0}
doclet.Href_Annotation_Interface_Title=annotation interface in {0}
doclet.Href_Enum_Title=enum in {0}
doclet.Href_Enum_Class_Title=enum class in {0}
doclet.Href_Type_Param_Title=type parameter in {0}
@@ -60,8 +60,8 @@ class in pkg">ParentClass</a>""",
<h2 title="Annotation Interface Hierarchy">Annotation Interface Hierarchy</h2>
<ul>
<li class="circle">pkg.<a href="AnnotationType.html" class="type-name-link" titl\
e="annotation in pkg">AnnotationType</a> (implements java.lang.annotation.Annota\
tion)</li>
e="annotation interface in pkg">AnnotationType</a> (implements java.lang.annotat\
ion.Annotation)</li>
</ul>""",
"""
<h2 title="Enum Class Hierarchy">Enum Class Hierarchy</h2>
@@ -305,16 +305,21 @@ void checkHtmlTableSummaries() {
void checkHtmlTableCaptions() {
//Package summary
checkOutput("pkg1/package-summary.html", true,
"<div class=\"caption\"><span>Class Summary</span></div>",
"<div class=\"caption\"><span>Interface Summary</span></div>");
"""
<div class="caption"><span>Class Summary</span></div>""",
"""
<div class="caption"><span>Interface Summary</span></div>""");

checkOutput("pkg2/package-summary.html", true,
"<div class=\"caption\"><span>Enum Class Summary</span></div>",
"<div class=\"caption\"><span>Annotation Interfaces Summary</span></div>");
"""
<div class="caption"><span>Enum Class Summary</span></div>""",
"""
<div class="caption"><span>Annotation Interfaces Summary</span></div>""");

// Class documentation
checkOutput("pkg1/C1.html", true,
"<div class=\"caption\"><span>Fields</span></div>",
"""
<div class="caption"><span>Fields</span></div>""",
"""
<div class="table-tabs" role="tablist" aria-orientation="horizontal">\
<button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-cont\
@@ -337,17 +342,22 @@ void checkHtmlTableCaptions() {
""");

checkOutput("pkg2/C2.html", true,
"<div class=\"caption\"><span>Nested Classes</span></div>",
"<div class=\"caption\"><span>Constructors</span></div>");
"""
<div class="caption"><span>Nested Classes</span></div>""",
"""
<div class="caption"><span>Constructors</span></div>""");

checkOutput("pkg2/C2.ModalExclusionType.html", true,
"<div class=\"caption\"><span>Enum Constants</span></div>");
"""
<div class="caption"><span>Enum Constants</span></div>""");

checkOutput("pkg2/C3.html", true,
"<div class=\"caption\"><span>Required Elements</span></div>");
"""
<div class="caption"><span>Required Elements</span></div>""");

checkOutput("pkg2/C4.html", true,
"<div class=\"caption\"><span>Optional Elements</span></div>");
"""
<div class="caption"><span>Optional Elements</span></div>""");

// Class use documentation
checkOutput("pkg1/class-use/I1.html", true,
@@ -393,8 +403,10 @@ void checkHtmlTableCaptions() {

// Deprecated
checkOutput("deprecated-list.html", true,
"<div class=\"caption\"><span>Fields</span></div>",
"<div class=\"caption\"><span>Methods</span></div>");
"""
<div class="caption"><span>Fields</span></div>""",
"""
<div class="caption"><span>Methods</span></div>""");

// Constant values
checkOutput("constant-values.html", true,
@@ -403,7 +415,8 @@ void checkHtmlTableCaptions() {

// Overview Summary
checkOutput("index.html", true,
"<div class=\"caption\"><span>Packages</span></div>");
"""
<div class="caption"><span>Packages</span></div>""");
}

/*
@@ -558,12 +571,13 @@ void checkHtmlTableContents() {

checkOutput("pkg2/package-summary.html", true,
"""
<div class="col-first even-row-color"><a href="C2.ModalExclusionType.html" title="enum class in pkg2">C2.ModalExclusionType</a></div>
<div class="col-first even-row-color"><a href="C2.ModalExclusionType.html" title\
="enum class in pkg2">C2.ModalExclusionType</a></div>
<div class="col-last even-row-color">
<div class="block">A sample enum.</div>
</div>""",
"""
<div class="col-first even-row-color"><a href="C3.html" title="annotation in pkg2">C3</a></div>
<div class="col-first even-row-color"><a href="C3.html" title="annotation interface in pkg2">C3</a></div>
<div class="col-last even-row-color">
<div class="block">Test Annotation class.</div>
</div>""");
@@ -677,15 +691,17 @@ void checkHtmlTableContents() {
<div class="deprecation-comment">don't use this field anymore.</div>
</div>""",
"""
<div class="col-summary-item-name even-row-color"><a href="pkg1/C1.html#deprecatedMethod()">pkg1.C1.deprecatedMethod()</a></div>
<div class="col-summary-item-name even-row-color"><a href="pkg1/C1.html#deprecat\
edMethod()">pkg1.C1.deprecatedMethod()</a></div>
<div class="col-last even-row-color">
<div class="deprecation-comment">don't use this anymore.</div>
</div>""");

// Constant values
checkOutput("constant-values.html", true,
"""
<div class="col-first even-row-color"><code id="pkg1.C1.CONSTANT1">public&nbsp;static&nbsp;final&nbsp;java.lang.String</code></div>
<div class="col-first even-row-color"><code id="pkg1.C1.CONSTANT1">public&nbsp;s\
tatic&nbsp;final&nbsp;java.lang.String</code></div>
<div class="col-second even-row-color"><code><a href="pkg1/C1.html#CONSTANT1">CONSTANT1</a></code></div>
<div class="col-last even-row-color"><code>"C1"</code></div>
</div>""");
@@ -715,10 +731,11 @@ void checkHtmlTableContentsNoComment() {

checkOutput("pkg2/package-summary.html", true,
"""
<div class="col-first even-row-color"><a href="C2.ModalExclusionType.html" title="enum class in pkg2">C2.ModalExclusionType</a></div>
<div class="col-first even-row-color"><a href="C2.ModalExclusionType.html" title\
="enum class in pkg2">C2.ModalExclusionType</a></div>
<div class="col-last even-row-color"></div>""",
"""
<div class="col-first even-row-color"><a href="C3.html" title="annotation in pkg2">C3</a></div>
<div class="col-first even-row-color"><a href="C3.html" title="annotation interface in pkg2">C3</a></div>
<div class="col-last even-row-color"></div>""");

// Class documentation
@@ -808,13 +825,15 @@ void checkHtmlTableContentsNoComment() {
<div class="col-summary-item-name even-row-color"><a href="pkg2/C2.html#dep_field">pkg2.C2.dep_field</a></div>
<div class="col-last even-row-color"></div>""",
"""
<div class="col-summary-item-name even-row-color"><a href="pkg1/C1.html#deprecatedMethod()">pkg1.C1.deprecatedMethod()</a></div>
<div class="col-summary-item-name even-row-color"><a href="pkg1/C1.html#deprecat\
edMethod()">pkg1.C1.deprecatedMethod()</a></div>
<div class="col-last even-row-color"></div>""");

// Constant values
checkOutput("constant-values.html", true,
"""
<div class="col-first even-row-color"><code id="pkg1.C1.CONSTANT1">public&nbsp;static&nbsp;final&nbsp;java.lang.String</code></div>
<div class="col-first even-row-color"><code id="pkg1.C1.CONSTANT1">public&nbsp;s\
tatic&nbsp;final&nbsp;java.lang.String</code></div>
<div class="col-second even-row-color"><code><a href="pkg1/C1.html#CONSTANT1">CONSTANT1</a></code></div>
<div class="col-last even-row-color"><code>"C1"</code></div>
</div>""");
@@ -58,9 +58,9 @@ public void test() {
<a href="pkg/Interface.html" class="type-name-link" title="interface in pkg">Int\
erface</a> - Interface in <a href="pkg/package-summary.html">pkg</a>""",
"""
<a href="pkg/AnnotationType.html" class="type-name-link" title="annotation in pk\
g">AnnotationType</a> - Annotation Interface in <a href="pkg/packag\
e-summary.html">pkg</a>""",
<a href="pkg/AnnotationType.html" class="type-name-link" title="annotation inter\
face in pkg">AnnotationType</a> - Annotation Interface in <a href="pkg/package-s\
ummary.html">pkg</a>""",
"""
<a href="pkg/Coin.html" class="type-name-link" title="enum class in pkg">Coin</a\
> - Enum Class in <a href="pkg/package-summary.html">pkg</a>""",

0 comments on commit 1a13c9e

Please sign in to comment.