8263468: New page for "recent" new API

Reviewed-by: erikj, jjg
This commit is contained in:
Hannes Wallnöfer 2021-06-08 18:22:16 +00:00
parent fafc4d9764
commit dc6c96bbaf
40 changed files with 1886 additions and 74 deletions

View File

@ -332,6 +332,12 @@ define SetupApiDocsGenerationBody
$$(eval $$(call create_overview_file,$1))
$1_OPTIONS += -overview $$($1_OVERVIEW)
# Add summary pages for new/deprecated APIs in recent releases
$1_OPTIONS += --since $(call CommaList, \
$(filter-out $(VERSION_DOCS_API_SINCE), \
$(call sequence, $(VERSION_DOCS_API_SINCE), $(VERSION_FEATURE))))
$1_OPTIONS += --since-label "New API since JDK $(VERSION_DOCS_API_SINCE)"
$$(foreach g, $$($1_GROUPS), \
$$(eval $1_OPTIONS += -group "$$($$g_GROUP_NAME)" "$$($$g_GROUP_MODULES)") \
)

View File

@ -533,6 +533,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
# We could define --with flags for these, if really needed
VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
VERSION_DOCS_API_SINCE="$DEFAULT_VERSION_DOCS_API_SINCE"
JDK_SOURCE_TARGET_VERSION="$DEFAULT_JDK_SOURCE_TARGET_VERSION"
AC_MSG_CHECKING([for version string])
@ -557,5 +558,6 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
AC_SUBST(VENDOR_VERSION_STRING)
AC_SUBST(VERSION_CLASSFILE_MAJOR)
AC_SUBST(VERSION_CLASSFILE_MINOR)
AC_SUBST(VERSION_DOCS_API_SINCE)
AC_SUBST(JDK_SOURCE_TARGET_VERSION)
])

View File

@ -230,6 +230,9 @@ VENDOR_VERSION_STRING := @VENDOR_VERSION_STRING@
VERSION_CLASSFILE_MAJOR := @VERSION_CLASSFILE_MAJOR@
VERSION_CLASSFILE_MINOR := @VERSION_CLASSFILE_MINOR@
# Version for API docs "new-since" feature
VERSION_DOCS_API_SINCE := @VERSION_DOCS_API_SINCE@
JDK_SOURCE_TARGET_VERSION := @JDK_SOURCE_TARGET_VERSION@
# Convenience CFLAGS settings for passing version information into native programs.

View File

@ -36,6 +36,7 @@ DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2021-09-14
DEFAULT_VERSION_CLASSFILE_MAJOR=61 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="16 17"
DEFAULT_JDK_SOURCE_TARGET_VERSION=17
DEFAULT_PROMOTED_VERSION_PRE=ea

View File

@ -142,6 +142,8 @@ public class Contents {
public final Content navProperty;
public final Content navServices;
public final Content nestedClassSummary;
public final Content newAPI;
public final Content newLabel;
public final Content noScriptMessage;
public final Content openModuleLabel;
public final Content openedTo;
@ -287,6 +289,8 @@ public class Contents {
navProperty = getContent("doclet.navProperty");
navServices = getContent("doclet.navServices");
nestedClassSummary = getContent("doclet.Nested_Class_Summary");
newAPI = getContent("doclet.New_API");
newLabel = getContent("doclet.New_Label");
noScriptMessage = getContent("doclet.No_Script_Message");
openedTo = getContent("doclet.OpenedTo");
openModuleLabel = getContent("doclet.Open_Module");

View File

@ -27,8 +27,11 @@ package jdk.javadoc.internal.doclets.formats.html;
import com.sun.source.doctree.DeprecatedTree;
import java.util.List;
import java.util.ListIterator;
import javax.lang.model.element.Element;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode;
import jdk.javadoc.internal.doclets.toolkit.Content;
@ -45,18 +48,17 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @see java.util.List
*/
public class DeprecatedListWriter extends SummaryListWriter<DeprecatedAPIListBuilder> {
private final static String TERMINALLY_DEPRECATED_KEY = "doclet.Terminally_Deprecated_Elements";
/**
* Constructor.
*
* @param configuration the configuration for this doclet
* @param filename the file to be generated
*/
public DeprecatedListWriter(HtmlConfiguration configuration, DocPath filename) {
super(configuration, filename, PageMode.DEPRECATED, "deprecated elements",
configuration.contents.deprecatedAPI, "doclet.Window_Deprecated_List");
@ -80,17 +82,22 @@ public class DeprecatedListWriter extends SummaryListWriter<DeprecatedAPIListBui
@Override
protected void addExtraSection(DeprecatedAPIListBuilder list, Content content) {
if (list.releases.size() > 1) {
content.add(HtmlTree.SPAN(contents.getContent("doclet.Deprecated_Tabs_Intro"))
.addStyle(HtmlStyle.helpNote));
}
addSummaryAPI(list.getForRemoval(), HtmlIds.FOR_REMOVAL,
"doclet.For_Removal", "doclet.Element", content);
TERMINALLY_DEPRECATED_KEY, "doclet.Element", content);
}
@Override
protected void addExtraIndexLink(DeprecatedAPIListBuilder list, Content target) {
if (!list.getForRemoval().isEmpty()) {
addIndexLink(HtmlIds.FOR_REMOVAL, "doclet.For_Removal", target);
addIndexLink(HtmlIds.FOR_REMOVAL, "doclet.Terminally_Deprecated", target);
}
}
@Override
protected void addComments(Element e, Content desc) {
List<? extends DeprecatedTree> tags = utils.getDeprecatedTrees(e);
if (!tags.isEmpty()) {
@ -100,4 +107,28 @@ public class DeprecatedListWriter extends SummaryListWriter<DeprecatedAPIListBui
}
}
@Override
protected void addTableTabs(Table table, String headingKey) {
List<String> releases = configuration.deprecatedAPIListBuilder.releases;
if (!releases.isEmpty()) {
table.setDefaultTab(getTableCaption(headingKey)).setAlwaysShowDefaultTab(true);
ListIterator<String> it = releases.listIterator(releases.size());
while (it.hasPrevious()) {
String release = it.previous();
Content tab = TERMINALLY_DEPRECATED_KEY.equals(headingKey)
? contents.getContent("doclet.Terminally_Deprecated_In_Release", release)
: contents.getContent("doclet.Deprecated_In_Release", release);
table.addTab(tab,
element -> release.equals(utils.getDeprecatedSince(element)));
}
getMainBodyScript().append(table.getScript());
}
}
@Override
protected Content getTableCaption(String headingKey) {
Content caption = contents.getContent(headingKey);
return TERMINALLY_DEPRECATED_KEY.equals(headingKey)
? caption : contents.getContent("doclet.Deprecated_Elements", caption);
}
}

View File

@ -346,15 +346,6 @@ public class HelpWriter extends HtmlDocletWriter {
pageKindsSection.add(section);
}
// Deprecated
if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.DEPRECATED)) {
section = newHelpSection(contents.deprecatedAPI, PageMode.DEPRECATED, subTOC);
Content deprBody = getContent("doclet.help.deprecated.body",
links.createLink(DocPaths.DEPRECATED_LIST, resources.getText("doclet.Deprecated_API")));
section.add(HtmlTree.P(deprBody));
pageKindsSection.add(section);
}
// Preview
if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.PREVIEW)) {
section = newHelpSection(contents.previewAPI, PageMode.PREVIEW, subTOC);
@ -364,6 +355,24 @@ public class HelpWriter extends HtmlDocletWriter {
pageKindsSection.add(section);
}
// New
if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.NEW)) {
section = newHelpSection(contents.newAPI, PageMode.NEW, subTOC);
Content newBody = getContent("doclet.help.new.body",
links.createLink(DocPaths.NEW_LIST, contents.newAPI));
section.add(HtmlTree.P(newBody));
pageKindsSection.add(section);
}
// Deprecated
if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.DEPRECATED)) {
section = newHelpSection(contents.deprecatedAPI, PageMode.DEPRECATED, subTOC);
Content deprBody = getContent("doclet.help.deprecated.body",
links.createLink(DocPaths.DEPRECATED_LIST, resources.getText("doclet.Deprecated_API")));
section.add(HtmlTree.P(deprBody));
pageKindsSection.add(section);
}
// Constant Field Values
if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.CONSTANT_VALUES)) {
section = newHelpSection(contents.constantsSummaryTitle, PageMode.CONSTANT_VALUES, subTOC);

View File

@ -60,6 +60,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DeprecatedAPIListBuilder;
import jdk.javadoc.internal.doclets.toolkit.util.DocFile;
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
import jdk.javadoc.internal.doclets.toolkit.util.NewAPIBuilder;
import jdk.javadoc.internal.doclets.toolkit.util.PreviewAPIListBuilder;
/**
@ -128,6 +129,14 @@ public class HtmlConfiguration extends BaseConfiguration {
*/
protected PreviewAPIListBuilder previewAPIListBuilder;
/**
* The collection of new API items, if any, to be displayed on the new-list page,
* or null if the page should not be generated.
* The page is only generated if the {@code --since} option is used with release
* names matching {@code @since} tags in the documented code.
*/
protected NewAPIBuilder newAPIPageBuilder;
public Contents contents;
protected final Messages messages;
@ -146,7 +155,7 @@ public class HtmlConfiguration extends BaseConfiguration {
// Note: this should (eventually) be merged with Navigation.PageMode,
// which performs a somewhat similar role
public enum ConditionalPage {
CONSTANT_VALUES, DEPRECATED, PREVIEW, SERIALIZED_FORM, SYSTEM_PROPERTIES
CONSTANT_VALUES, DEPRECATED, PREVIEW, SERIALIZED_FORM, SYSTEM_PROPERTIES, NEW
}
/**

View File

@ -55,6 +55,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder;
import jdk.javadoc.internal.doclets.toolkit.util.NewAPIBuilder;
import jdk.javadoc.internal.doclets.toolkit.util.PreviewAPIListBuilder;
/**
@ -173,18 +174,25 @@ public class HtmlDoclet extends AbstractDoclet {
@Override // defined by AbstractDoclet
public void generateClassFiles(ClassTree classTree) throws DocletException {
List<String> since = configuration.getOptions().since();
if (!(configuration.getOptions().noDeprecated()
|| configuration.getOptions().noDeprecatedList())) {
DeprecatedAPIListBuilder builder = new DeprecatedAPIListBuilder(configuration);
if (!builder.isEmpty()) {
configuration.deprecatedAPIListBuilder = builder;
DeprecatedAPIListBuilder deprecatedBuilder = new DeprecatedAPIListBuilder(configuration, since);
if (!deprecatedBuilder.isEmpty()) {
configuration.deprecatedAPIListBuilder = deprecatedBuilder;
configuration.conditionalPages.add(HtmlConfiguration.ConditionalPage.DEPRECATED);
}
}
PreviewAPIListBuilder builder = new PreviewAPIListBuilder(configuration);
if (!builder.isEmpty()) {
configuration.previewAPIListBuilder = builder;
if (!since.isEmpty()) {
NewAPIBuilder newAPIBuilder = new NewAPIBuilder(configuration, since);
if (!newAPIBuilder.isEmpty()) {
configuration.newAPIPageBuilder = newAPIBuilder;
configuration.conditionalPages.add(HtmlConfiguration.ConditionalPage.NEW);
}
}
PreviewAPIListBuilder previewBuilder = new PreviewAPIListBuilder(configuration);
if (!previewBuilder.isEmpty()) {
configuration.previewAPIListBuilder = previewBuilder;
configuration.conditionalPages.add(HtmlConfiguration.ConditionalPage.PREVIEW);
}
@ -239,6 +247,10 @@ public class HtmlDoclet extends AbstractDoclet {
PreviewListWriter.generate(configuration);
}
if (configuration.conditionalPages.contains((HtmlConfiguration.ConditionalPage.NEW))) {
NewAPIListWriter.generate(configuration);
}
if (options.createOverview()) {
if (configuration.showModules) {
ModuleIndexWriter.generate(configuration);

View File

@ -2103,7 +2103,8 @@ public class HtmlDocletWriter {
String kind = getClass().getSimpleName()
.replaceAll("(Writer)?(Impl)?$", "")
.replaceAll("AnnotationType", "Class")
.replaceAll("^(Module|Package|Class)$", "$1Declaration");
.replaceAll("^(Module|Package|Class)$", "$1Declaration")
.replace("API", "Api");
String page = kind.substring(0, 1).toLowerCase(Locale.US) + kind.substring(1) + "Page";
return HtmlStyle.valueOf(page);
}

View File

@ -88,6 +88,7 @@ public class Navigation {
HELP,
INDEX,
MODULE,
NEW,
OVERVIEW,
PACKAGE,
PREVIEW,
@ -171,8 +172,9 @@ public class Navigation {
addPageLabel(tree, contents.classLabel, true);
addPageLabel(tree, contents.useLabel, options.classUse());
addTreeLink(tree);
addDeprecatedLink(tree);
addPreviewLink(tree);
addNewLink(tree);
addDeprecatedLink(tree);
addIndexLink(tree);
addHelpLink(tree);
break;
@ -183,8 +185,9 @@ public class Navigation {
addPageLabel(tree, contents.classLabel, true);
addPageLabel(tree, contents.useLabel, options.classUse());
addTreeLink(tree);
addDeprecatedLink(tree);
addPreviewLink(tree);
addNewLink(tree);
addDeprecatedLink(tree);
addIndexLink(tree);
addHelpLink(tree);
break;
@ -201,8 +204,9 @@ public class Navigation {
addContentToTree(tree, links.createLink(DocPaths.PACKAGE_TREE,
contents.treeLabel, ""));
}
addDeprecatedLink(tree);
addPreviewLink(tree);
addNewLink(tree);
addDeprecatedLink(tree);
addIndexLink(tree);
addHelpLink(tree);
break;
@ -219,8 +223,9 @@ public class Navigation {
addContentToTree(tree, links.createLink(DocPaths.PACKAGE_TREE,
contents.treeLabel, ""));
}
addDeprecatedLink(tree);
addPreviewLink(tree);
addNewLink(tree);
addDeprecatedLink(tree);
addIndexLink(tree);
addHelpLink(tree);
break;
@ -242,8 +247,9 @@ public class Navigation {
? links.createLink(DocPath.parent.resolve(DocPaths.PACKAGE_TREE), contents.treeLabel)
: links.createLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), contents.treeLabel));
}
addDeprecatedLink(tree);
addPreviewLink(tree);
addNewLink(tree);
addDeprecatedLink(tree);
addIndexLink(tree);
addHelpLink(tree);
break;
@ -259,8 +265,9 @@ public class Navigation {
addPageLabel(tree, contents.classLabel, true);
addPageLabel(tree, contents.useLabel, options.classUse());
addActivePageLink(tree, contents.treeLabel, options.createTree());
addDeprecatedLink(tree);
addPreviewLink(tree);
addNewLink(tree);
addDeprecatedLink(tree);
addIndexLink(tree);
addHelpLink(tree);
break;
@ -268,24 +275,31 @@ public class Navigation {
case INDEX:
case HELP:
case PREVIEW:
case NEW:
addOverviewLink(tree);
addModuleLink(tree);
addPackageLink(tree);
addPageLabel(tree, contents.classLabel, true);
addPageLabel(tree, contents.useLabel, options.classUse());
addTreeLink(tree);
if (documentedPage == PageMode.DEPRECATED) {
addActivePageLink(tree, contents.deprecatedLabel,
configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.DEPRECATED));
} else {
addDeprecatedLink(tree);
}
if (documentedPage == PageMode.PREVIEW) {
addActivePageLink(tree, contents.previewLabel,
configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.PREVIEW));
} else {
addPreviewLink(tree);
}
if (documentedPage == PageMode.NEW) {
addActivePageLink(tree, contents.newLabel,
configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.NEW));
} else {
addNewLink(tree);
}
if (documentedPage == PageMode.DEPRECATED) {
addActivePageLink(tree, contents.deprecatedLabel,
configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.DEPRECATED));
} else {
addDeprecatedLink(tree);
}
if (documentedPage == PageMode.INDEX) {
addActivePageLink(tree, contents.indexLabel, options.createIndex());
} else {
@ -308,8 +322,9 @@ public class Navigation {
addPageLabel(tree, contents.classLabel, true);
addPageLabel(tree, contents.useLabel, options.classUse());
addTreeLink(tree);
addDeprecatedLink(tree);
addPreviewLink(tree);
addNewLink(tree);
addDeprecatedLink(tree);
addIndexLink(tree);
addHelpLink(tree);
break;
@ -320,8 +335,9 @@ public class Navigation {
addPageLabel(tree, contents.classLabel, true);
addPageLabel(tree, contents.useLabel, options.classUse());
addTreeLink(tree);
addDeprecatedLink(tree);
addPreviewLink(tree);
addNewLink(tree);
addDeprecatedLink(tree);
addIndexLink(tree);
addHelpLink(tree);
break;
@ -531,6 +547,13 @@ public class Navigation {
}
}
private void addNewLink(Content tree) {
if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.NEW)) {
tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(DocPaths.NEW_LIST),
contents.newLabel, "")));
}
}
private void addIndexLink(Content tree) {
if (options.createIndex()) {
tree.add(HtmlTree.LI(links.createLink(pathToRoot.resolve(

View File

@ -0,0 +1,135 @@
/*
* Copyright (c) 2021, 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.formats.html;
import javax.lang.model.element.Element;
import com.sun.source.doctree.DocTree;
import jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
import jdk.javadoc.internal.doclets.formats.html.markup.Text;
import jdk.javadoc.internal.doclets.toolkit.Content;
import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
import jdk.javadoc.internal.doclets.toolkit.util.NewAPIBuilder;
import java.util.List;
import java.util.ListIterator;
import static com.sun.source.doctree.DocTree.Kind.SINCE;
/**
* Generates a file containing a list of new API elements with the appropriate links.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
*/
public class NewAPIListWriter extends SummaryListWriter<NewAPIBuilder> {
/**
* Constructor.
*
* @param configuration the configuration for this doclet
*/
public NewAPIListWriter(NewAPIBuilder builder, HtmlConfiguration configuration, DocPath filename) {
super(configuration, filename, PageMode.NEW, "new elements",
Text.of(getHeading(builder, configuration)),
"doclet.Window_New_List");
}
/**
* If the "New API" page is configured this method instantiates a NewAPIListWriter
* and generates the file.
*
* @param configuration the current configuration of the doclet.
* @throws DocFileIOException if there is a problem writing the new API list
*/
public static void generate(HtmlConfiguration configuration) throws DocFileIOException {
if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.NEW)) {
NewAPIBuilder builder = configuration.newAPIPageBuilder;
NewAPIListWriter writer = new NewAPIListWriter(builder, configuration, DocPaths.NEW_LIST);
writer.generateSummaryListFile(builder);
}
}
@Override
protected void addExtraSection(NewAPIBuilder list, Content content) {
if (list.releases.size() > 1) {
content.add(HtmlTree.SPAN(contents.getContent("doclet.New_Tabs_Intro"))
.addStyle(HtmlStyle.helpNote));
}
}
@Override
protected void addTableTabs(Table table, String headingKey) {
List<String> releases = configuration.newAPIPageBuilder.releases;
if (!releases.isEmpty()) {
table.setDefaultTab(getTableCaption(headingKey)).setAlwaysShowDefaultTab(true);
ListIterator<String> it = releases.listIterator(releases.size());
while (it.hasPrevious()) {
String release = it.previous();
table.addTab(
releases.size() == 1
? getTableCaption(headingKey)
: contents.getContent(
"doclet.New_Elements_Added_In_Release", release),
element -> {
if (!utils.hasDocCommentTree(element)) {
return false;
}
List<? extends DocTree> since = utils.getBlockTags(element, SINCE);
if (since.isEmpty()) {
return false;
}
CommentHelper ch = utils.getCommentHelper(element);
return since.stream().anyMatch(tree -> release.equals(ch.getBody(tree).toString()));
});
}
getMainBodyScript().append(table.getScript());
}
}
@Override
protected void addComments(Element e, Content desc) {
addSummaryComment(e, desc);
}
@Override
protected Content getTableCaption(String headingKey) {
return contents.getContent("doclet.New_Elements", super.getTableCaption(headingKey));
}
private static String getHeading(NewAPIBuilder builder, HtmlConfiguration configuration) {
String label = configuration.getOptions().sinceLabel();
return label == null ? configuration.docResources.getText("doclet.New_API") : label;
}
}

View File

@ -75,8 +75,7 @@ public class PreviewListWriter extends SummaryListWriter<PreviewAPIListBuilder>
if (configuration.conditionalPages.contains(HtmlConfiguration.ConditionalPage.PREVIEW)) {
DocPath filename = DocPaths.PREVIEW_LIST;
PreviewListWriter depr = new PreviewListWriter(configuration, filename);
depr.generateSummaryListFile(
new PreviewAPIListBuilder(configuration));
depr.generateSummaryListFile(configuration.previewAPIListBuilder);
}
}

View File

@ -53,7 +53,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.SummaryAPIListBuilder.SummaryEl
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public abstract class SummaryListWriter<L extends SummaryAPIListBuilder> extends SubWriterHolderWriter {
public class SummaryListWriter<L extends SummaryAPIListBuilder> extends SubWriterHolderWriter {
private String getHeadingKey(SummaryElementKind kind) {
return switch (kind) {
@ -208,12 +208,12 @@ public abstract class SummaryListWriter<L extends SummaryAPIListBuilder> extends
TableHeader tableHeader = new TableHeader(
contents.getContent(headerKey), contents.descriptionLabel);
Content caption = contents.getContent(headingKey);
Table table = new Table(HtmlStyle.summaryTable)
.setCaption(caption)
.setCaption(getTableCaption(headingKey))
.setHeader(tableHeader)
.setId(id)
.setColumnStyles(HtmlStyle.colSummaryItemName, HtmlStyle.colLast);
addTableTabs(table, headingKey);
for (Element e : apiList) {
Content link;
switch (e.getKind()) {
@ -230,7 +230,7 @@ public abstract class SummaryListWriter<L extends SummaryAPIListBuilder> extends
}
Content desc = new ContentBuilder();
addComments(e, desc);
table.addRow(link, desc);
table.addRow(e, link, desc);
}
// note: singleton list
contentTree.add(HtmlTree.UL(HtmlStyle.blockList, HtmlTree.LI(table)));
@ -243,7 +243,8 @@ public abstract class SummaryListWriter<L extends SummaryAPIListBuilder> extends
* @param e the element for which the summary text should be added
* @param desc the target to which the text should be added
*/
protected abstract void addComments(Element e, Content desc);
protected void addComments(Element e, Content desc) {
}
protected Content getSummaryLink(Element e) {
AbstractMemberWriter writer = switch (e.getKind()) {
@ -277,4 +278,22 @@ public abstract class SummaryListWriter<L extends SummaryAPIListBuilder> extends
*/
protected void addExtraIndexLink(L list, Content target) {
}
/**
* Returns the caption for the table with the given {@code headingKey}.
*
* @param headingKey the key for the table heading
* @return the table caption
*/
protected Content getTableCaption(String headingKey) {
return contents.getContent(headingKey);
}
/**
* Allow subclasses to add extra tabs to the element tables.
*
* @param table the element table
* @param headingKey the key for the caption (default tab)
*/
protected void addTableTabs(Table table, String headingKey) {}
}

View File

@ -87,6 +87,7 @@ public class Table extends Content {
private List<HtmlStyle> stripedStyles = Arrays.asList(HtmlStyle.evenRowColor, HtmlStyle.oddRowColor);
private final List<Content> bodyRows;
private HtmlId id;
private boolean alwaysShowDefaultTab = false;
/**
* Creates a builder for an HTML element representing a table.
@ -142,6 +143,16 @@ public class Table extends Content {
return this;
}
/**
* Sets whether to display the default tab even if tabs are empty or only contain a single tab.
* @param showDefaultTab true if default tab should always be shown
* @return this object
*/
public Table setAlwaysShowDefaultTab(boolean showDefaultTab) {
this.alwaysShowDefaultTab = showDefaultTab;
return this;
}
/**
* Sets the name of the styles used to display the tabs.
*
@ -376,7 +387,7 @@ public class Table extends Content {
};
HtmlTree table = new HtmlTree(TagName.DIV).setStyle(tableStyle).addStyle(columnStyle);
if (tabMap == null || tabs.size() == 1) {
if ((tabMap == null || tabs.size() == 1) && !alwaysShowDefaultTab) {
if (tabMap == null) {
main.add(caption);
} else {

View File

@ -719,6 +719,11 @@ public enum HtmlStyle {
*/
deprecatedListPage,
/**
* The class of the {@code body} element for the page listing any deprecated items.
*/
deprecatedInReleasePage,
/**
* The class of the {@code body} element for a "doc-file" page..
*/
@ -749,6 +754,11 @@ public enum HtmlStyle {
*/
moduleIndexPage,
/**
* The class of the {@code body} element for the page listing new API elements.
*/
newApiListPage,
/**
* The class of the {@code body} element for a package-declaration page.
*/

View File

@ -81,6 +81,7 @@ doclet.Skip_navigation_links=Skip navigation links
doclet.Navigation=Navigation
doclet.navDeprecated=Deprecated
doclet.Window_Deprecated_List=Deprecated List
doclet.Window_New_List=New API List
doclet.Window_Preview_List=Preview List
doclet.Overrides=Overrides:
doclet.in_class=in class
@ -104,10 +105,27 @@ doclet.see.class_or_package_not_accessible=Tag {0}: reference not accessible: {1
doclet.see.nested_link=Tag {0}: nested link
doclet.tag.invalid_usage=invalid usage of tag {0}
doclet.Deprecated_API=Deprecated API
doclet.Deprecated_Elements=Deprecated {0}
doclet.Deprecated_In_Release=Deprecated in {0}
doclet.Deprecated_Tabs_Intro=(The leftmost tab "Deprecated ..." indicates all the \
deprecated elements, regardless of the releases in which they were deprecated. \
Each of the other tabs "Deprecated in ..." indicates the elements deprecated \
in a specific release.)
doclet.New_API=New API
doclet.New_Elements=New {0}
doclet.New_Elements_Added_In_Release=Added in {0}
doclet.New_Label=New
doclet.New_Tabs_Intro=(The leftmost tab "New ..." indicates all the new elements, \
regardless of the releases in which they were added. Each of the other tabs \
"Added in ..." indicates the new elements added in a specific release. \
Any element shown under the leftmost tab is also shown under one of the \
righthand tabs.)
doclet.Preview_API=Preview API
doclet.Preview_Label=Preview
doclet.Preview_Mark=PREVIEW
doclet.For_Removal=For Removal
doclet.Terminally_Deprecated=Terminally Deprecated
doclet.Terminally_Deprecated_Elements=Terminally Deprecated Elements
doclet.Terminally_Deprecated_In_Release=Terminally Deprecated in {0}
doclet.Annotation_Types=Annotation Types
doclet.Annotation_Interfaces=Annotation Interfaces
doclet.Annotation_Type_Members=Annotation Type Elements
@ -245,6 +263,8 @@ doclet.help.deprecated.body=\
doclet.help.preview.body=\
The {0} page lists all of the Preview APIs. \
Preview APIs may be removed in future implementations.
doclet.help.new.body=\
The {0} page lists APIs that have been added in recent releases.
doclet.help.index.head=\
Index
# 0: link to Index page; 1: list of links to pages
@ -496,6 +516,16 @@ doclet.usage.nooverview.description=\
doclet.usage.serialwarn.description=\
Generate warning about @serial tag
doclet.usage.since.parameters=\
<release>(,<release>)*
doclet.usage.since.description=\
Document new and deprecated API in the specified releases
doclet.usage.since-label.parameters=\
<text>
doclet.usage.since-label.description=\
Provide text to use in the heading of the "New API" page
doclet.usage.tag.parameters=\
<name>:<locations>:<header>
doclet.usage.tag.description=\

View File

@ -32,6 +32,7 @@ import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
@ -248,6 +249,18 @@ public abstract class BaseOptions {
*/
private boolean showVersion = false;
/**
* Argument for command line option {@code --since}.
* Specifies a list of release names for which to document API changes.
*/
private List<String> since = List.of();
/**
* Argument for command line option {@code --since-label}.
* Specifies custom text to use as heading of New API page.
*/
private String sinceLabel;
/**
* Argument for command-line option {@code -sourcetab}.
* The specified amount of space between tab stops.
@ -476,6 +489,22 @@ public abstract class BaseOptions {
}
},
new Option(resources, "--since", 1) {
@Override
public boolean process(String opt, List<String> args) {
since = Arrays.stream(args.get(0).split(",")).map(String::trim).toList();
return true;
}
},
new Option(resources, "--since-label", 1) {
@Override
public boolean process(String opt, List<String> args) {
sinceLabel = args.get(0);
return true;
}
},
new Option(resources, "-sourcetab", 1) {
@Override
public boolean process(String opt, List<String> args) {
@ -892,6 +921,20 @@ public abstract class BaseOptions {
return showVersion;
}
/**
* Arguments for command line option {@code --since}.
*/
public List<String> since() {
return Collections.unmodifiableList(since);
}
/**
* Arguments for command line option {@code --since-label}.
*/
public String sinceLabel() {
return sinceLabel;
}
/**
* Argument for command-line option {@code -sourcetab}.
* The specified amount of space between tab stops.

View File

@ -40,15 +40,20 @@ import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
* deletion without notice.</b>
*/
public class DeprecatedAPIListBuilder extends SummaryAPIListBuilder {
private SortedSet<Element> forRemoval;
public final List<String> releases;
/**
* Constructor.
*
* @param configuration the current configuration of the doclet
* @param releases list of releases
*/
public DeprecatedAPIListBuilder(BaseConfiguration configuration) {
public DeprecatedAPIListBuilder(BaseConfiguration configuration, List<String> releases) {
super(configuration, configuration.utils::isDeprecated);
this.releases = releases;
buildSummaryAPIInfo();
}
public SortedSet<Element> getForRemoval() {
@ -64,5 +69,4 @@ public class DeprecatedAPIListBuilder extends SummaryAPIListBuilder {
getForRemoval().add(e);
}
}
}

View File

@ -142,9 +142,12 @@ public class DocPaths {
/** The name of the file for the package usage info. */
public static final DocPath PACKAGE_USE = DocPath.create("package-use.html");
/** The name of the fie for preview elements. */
/** The name of the file for preview elements. */
public static final DocPath PREVIEW_LIST = DocPath.create("preview-list.html");
/** The name of the file for new elements. */
public static final DocPath NEW_LIST = DocPath.create("new-list.html");
/** The name of the file for all system properties. */
public static final DocPath SYSTEM_PROPERTIES = DocPath.create("system-properties.html");

View File

@ -0,0 +1,69 @@
/*
* Copyright (c) 2021, 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.toolkit.util;
import com.sun.source.doctree.DocTree;
import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
import javax.lang.model.element.Element;
import java.util.List;
import static com.sun.source.doctree.DocTree.Kind.SINCE;
/**
* Build list of all the packages, classes, constructors, fields and methods
* that were added in one of the releases specified by the {@code --since}
* option. The release names must exactly match the names used in the javadoc
* {@code @since} tags of the respective elements.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public class NewAPIBuilder extends SummaryAPIListBuilder {
public final List<String> releases;
public NewAPIBuilder(BaseConfiguration configuration, List<String> releases) {
super(configuration, element -> isNewAPI(element, configuration.utils, releases));
this.releases = releases;
buildSummaryAPIInfo();
}
private static boolean isNewAPI(Element e, Utils utils, List<String> releases) {
if (!utils.hasDocCommentTree(e)) {
return false;
}
List<? extends DocTree> since = utils.getBlockTags(e, SINCE);
if (since.isEmpty()) {
return false;
}
CommentHelper ch = utils.getCommentHelper(e);
return since.stream().anyMatch(tree -> releases.contains(ch.getBody(tree).toString()));
}
}

View File

@ -44,5 +44,6 @@ public class PreviewAPIListBuilder extends SummaryAPIListBuilder {
*/
public PreviewAPIListBuilder(BaseConfiguration configuration) {
super(configuration, e -> configuration.utils.isPreviewAPI(e));
buildSummaryAPIInfo();
}
}

View File

@ -84,7 +84,6 @@ public class SummaryAPIListBuilder {
for (SummaryElementKind kind : SummaryElementKind.values()) {
summaryMap.put(kind, createSummarySet());
}
buildSummaryAPIInfo();
}
public boolean isEmpty() {
@ -96,23 +95,23 @@ public class SummaryAPIListBuilder {
* Build separate lists for summary modules, packages, classes, constructors,
* methods and fields.
*/
private void buildSummaryAPIInfo() {
protected void buildSummaryAPIInfo() {
SortedSet<ModuleElement> modules = configuration.modules;
SortedSet<Element> mset = summaryMap.get(SummaryElementKind.MODULE);
for (Element me : modules) {
if (belongsToSummary.test(me)) {
mset.add(me);
}
handleElement(me);
}
}
SortedSet<PackageElement> packages = configuration.packages;
SortedSet<Element> pset = summaryMap.get(SummaryElementKind.PACKAGE);
for (Element pe : packages) {
if (belongsToSummary.test(pe)) {
pset.add(pe);
}
handleElement(pe);
}
}
for (Element e : configuration.getIncludedTypeElements()) {
TypeElement te = (TypeElement)e;
SortedSet<Element> eset;
@ -145,8 +144,8 @@ public class SummaryAPIListBuilder {
eset.add(e);
}
}
}
handleElement(te);
}
composeSummaryList(summaryMap.get(SummaryElementKind.FIELD),
utils.getFields(te));
composeSummaryList(summaryMap.get(SummaryElementKind.METHOD),
@ -184,10 +183,10 @@ public class SummaryAPIListBuilder {
for (Element member : members) {
if (belongsToSummary.test(member)) {
sset.add(member);
}
handleElement(member);
}
}
}
/**
* Return the list of summary elements of a given type.
@ -209,7 +208,7 @@ public class SummaryAPIListBuilder {
}
/**
* Additional extra processing of an analyzed element.
* Additional extra processing of an included element.
*
* @param e element to process
*/

View File

@ -1503,12 +1503,30 @@ public class Utils {
}
/**
* Return true if the given Element is deprecated for removal.
* Returns true if the given Element is deprecated for removal.
*
* @param e the Element to check.
* @return true if the given Element is deprecated for removal.
*/
public boolean isDeprecatedForRemoval(Element e) {
Object forRemoval = getDeprecatedElement(e, "forRemoval");
return forRemoval != null && (boolean) forRemoval;
}
/**
* Returns the value of the {@code Deprecated.since} element if it is set on the given Element.
*
* @param e the Element to check.
* @return the Deprecated.since value for e, or null.
*/
public String getDeprecatedSince(Element e) {
return (String) getDeprecatedElement(e, "since");
}
/**
* Returns the Deprecated annotation element value of the given element, or null.
*/
private Object getDeprecatedElement(Element e, String elementName) {
List<? extends AnnotationMirror> annotationList = e.getAnnotationMirrors();
JavacTypes jctypes = ((DocEnvImpl) configuration.docEnv).toolEnv.typeutils;
for (AnnotationMirror anno : annotationList) {
@ -1516,14 +1534,14 @@ public class Utils {
Map<? extends ExecutableElement, ? extends AnnotationValue> pairs = anno.getElementValues();
if (!pairs.isEmpty()) {
for (ExecutableElement element : pairs.keySet()) {
if (element.getSimpleName().contentEquals("forRemoval")) {
return Boolean.parseBoolean((pairs.get(element)).toString());
if (element.getSimpleName().contentEquals(elementName)) {
return (pairs.get(element)).getValue();
}
}
}
}
}
return false;
return null;
}
/**

View File

@ -267,7 +267,7 @@ public class TestDeprecatedDocs extends JavadocTester {
checkOutput("deprecated-list.html", true,
"""
<ul>
<li><a href="#for-removal">For Removal</a></li>
<li><a href="#for-removal">Terminally Deprecated</a></li>
<li><a href="#class">Classes</a></li>
<li><a href="#enum-class">Enum Classes</a></li>
<li><a href="#exception">Exceptions</a></li>
@ -281,13 +281,13 @@ public class TestDeprecatedDocs extends JavadocTester {
</ul>""",
"""
<div id="for-removal">
<div class="caption"><span>For Removal</span></div>
<div class="caption"><span>Terminally Deprecated Elements</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Element</div>
<div class="table-header col-last">Description</div>""",
"""
<div id="enum-class">
<div class="caption"><span>Enum Classes</span></div>
<div class="caption"><span>Deprecated Enum Classes</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Enum Class</div>
<div class="table-header col-last">Description</div>
@ -297,7 +297,7 @@ public class TestDeprecatedDocs extends JavadocTester {
</div>""",
"""
<div id="exception">
<div class="caption"><span>Exceptions</span></div>
<div class="caption"><span>Deprecated Exceptions</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Exceptions</div>
<div class="table-header col-last">Description</div>
@ -307,7 +307,7 @@ public class TestDeprecatedDocs extends JavadocTester {
</div>""",
"""
<div id="field">
<div class="caption"><span>Fields</span></div>
<div class="caption"><span>Deprecated Fields</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Field</div>
<div class="table-header col-last">Description</div>
@ -337,7 +337,7 @@ public class TestDeprecatedDocs extends JavadocTester {
</div>""",
"""
<div id="method">
<div class="caption"><span>Methods</span></div>
<div class="caption"><span>Deprecated Methods</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Method</div>
<div class="table-header col-last">Description</div>
@ -365,7 +365,7 @@ public class TestDeprecatedDocs extends JavadocTester {
</div>""",
"""
<div id="constructor">
<div class="caption"><span>Constructors</span></div>
<div class="caption"><span>Deprecated Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2021, 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
@ -85,7 +85,7 @@ public class TestHtmlTableStyles extends JavadocTester {
checkOutput("deprecated-list.html", true,
"""
<div id="method">
<div class="caption"><span>Methods</span></div>
<div class="caption"><span>Deprecated Methods</span></div>
<div class="summary-table two-column-summary">""");
checkOutput("constant-values.html", true,

View File

@ -423,9 +423,9 @@ public class TestHtmlTableTags extends JavadocTester {
// Deprecated
checkOutput("deprecated-list.html", true,
"""
<div class="caption"><span>Fields</span></div>""",
<div class="caption"><span>Deprecated Fields</span></div>""",
"""
<div class="caption"><span>Methods</span></div>""");
<div class="caption"><span>Deprecated Methods</span></div>""");
// Constant values
checkOutput("constant-values.html", true,

View File

@ -1111,7 +1111,7 @@ public class TestModules extends JavadocTester {
checkOutput("deprecated-list.html", found,
"""
<ul>
<li><a href="#for-removal">For Removal</a></li>
<li><a href="#for-removal">Terminally Deprecated</a></li>
<li><a href="#module">Modules</a></li>
</ul>""",
"""

View File

@ -0,0 +1,884 @@
/*
* Copyright (c) 2021, 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.
*/
/*
* @test
* @bug 8263468
* @summary New page for "recent" new API
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
* @build javadoc.tester.*
* @run main TestNewApiList
*/
import javadoc.tester.JavadocTester;
/**
* Test --since option and "New API" list.
*/
public class TestNewApiList extends JavadocTester {
public static void main(String... args) throws Exception {
TestNewApiList test = new TestNewApiList();
test.runTests();
}
@Test
public void testMultiRelease() throws Exception {
javadoc("-d", "out-multi",
"--no-platform-links",
"--module-source-path", testSrc,
"--since", "0.9,v1.0,1.2,2.0b,3.2,5",
"--since-label", "New API in recent releases",
"--module", "mdl",
"pkg");
checkExit(Exit.OK);
checkMultiReleaseContents();
checkMultiReleaseNewElements();
checkMultiReleaseDeprecatedElements();
}
@Test
public void testSingleRelease() throws Exception {
javadoc("-d", "out-single",
"--no-platform-links",
"--module-source-path", testSrc,
"--since", "5",
"--module", "mdl",
"pkg");
checkExit(Exit.OK);
checkSingleReleaseContents();
checkSingleReleaseNewElements();
checkSingleReleaseDeprecatedElements();
}
@Test
public void testPackage() throws Exception {
javadoc("-d", "out-package",
"--no-platform-links",
"-sourcepath", testSrc,
"--since", "1.2,2.0b,3.2,5,6",
"pkg");
checkExit(Exit.OK);
checkPackageContents();
checkPackageNewElements();
checkPackageDeprecatedElements();
}
@Test
public void testNoList() throws Exception {
javadoc("-d", "out-none",
"--no-platform-links",
"--module-source-path", testSrc,
"--since", "foo,bar",
"--since-label", "New API in foo and bar",
"--module", "mdl",
"pkg");
checkExit(Exit.OK);
checkFiles(false, "new-list.html");
}
private void checkMultiReleaseContents() {
checkOutput("new-list.html", true,
"""
<h1 title="New API in recent releases" class="title">New API in recent releases</h1>
<h2 title="Contents">Contents</h2>
<ul>
<li><a href="#module">Modules</a></li>
<li><a href="#package">Packages</a></li>
<li><a href="#interface">Interfaces</a></li>
<li><a href="#class">Classes</a></li>
<li><a href="#enum-class">Enum Classes</a></li>
<li><a href="#exception">Exceptions</a></li>
<li><a href="#error">Errors</a></li>
<li><a href="#record-class">Record Classes</a></li>
<li><a href="#annotation-interface">Annotation Interfaces</a></li>
<li><a href="#field">Fields</a></li>
<li><a href="#method">Methods</a></li>
<li><a href="#constructor">Constructors</a></li>
<li><a href="#enum-constant">Enum Constants</a></li>
<li><a href="#annotation-interface-member">Annotation Interface Elements</a></li>
</ul>
</div>
<span class="help-note">(The leftmost tab "New ..." indicates all the new elements, \
regardless of the releases in which they were added. Each of the other tabs "Added i\
n ..." indicates the new elements added in a specific release. Any element shown und\
er the leftmost tab is also shown under one of the righthand tabs.)</span>""");
}
private void checkMultiReleaseNewElements() {
checkOutput("new-list.html", true,
"""
<div id="module">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="mod\
ule-tab0" role="tab" aria-selected="true" aria-controls="module.tabpanel" tabindex="\
0" onkeydown="switchTab(event)" onclick="show('module', 'module', 2)" class="active-\
table-tab">New Modules</button><button id="module-tab2" role="tab" aria-selected="fa\
lse" aria-controls="module.tabpanel" tabindex="-1" onkeydown="switchTab(event)" oncl\
ick="show('module', 'module-tab2', 2)" class="table-tab">Added in 3.2</button></div>
<div id="module.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="module-tab0">
<div class="table-header col-first">Module</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color module module-tab2"><a href="mdl/module-summary.html">mdl</a></div>
<div class="col-last even-row-color module module-tab2">
<div class="block">Module mdl.</div>
</div>""",
"""
<div id="package">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="pac\
kage-tab0" role="tab" aria-selected="true" aria-controls="package.tabpanel" tabindex\
="0" onkeydown="switchTab(event)" onclick="show('package', 'package', 2)" class="act\
ive-table-tab">New Packages</button><button id="package-tab5" role="tab" aria-select\
ed="false" aria-controls="package.tabpanel" tabindex="-1" onkeydown="switchTab(event\
)" onclick="show('package', 'package-tab5', 2)" class="table-tab">Added in v1.0</but\
ton></div>
<div id="package.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="package-tab0">
<div class="table-header col-first">Package</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color package package-tab5"><a href="mdl/pkg/package-summary.html">pkg</a></div>
<div class="col-last even-row-color package package-tab5">
<div class="block">Package pkg.</div>
</div>""",
"""
<div id="interface">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="int\
erface-tab0" role="tab" aria-selected="true" aria-controls="interface.tabpanel" tabi\
ndex="0" onkeydown="switchTab(event)" onclick="show('interface', 'interface', 2)" cl\
ass="active-table-tab">New Interfaces</button><button id="interface-tab6" role="tab"\
aria-selected="false" aria-controls="interface.tabpanel" tabindex="-1" onkeydown="s\
witchTab(event)" onclick="show('interface', 'interface-tab6', 2)" class="table-tab">\
Added in 0.9</button></div>
<div id="interface.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="interface-tab0">
<div class="table-header col-first">Interface</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color interface interface-tab6"><a href="\
mdl/pkg/TestInterface.html" title="interface in pkg">pkg.TestInterface</a></div>
<div class="col-last even-row-color interface interface-tab6">
<div class="block">Test interface.</div>
</div>""",
"""
<div id="class">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="cla\
ss-tab0" role="tab" aria-selected="true" aria-controls="class.tabpanel" tabindex="0"\
onkeydown="switchTab(event)" onclick="show('class', 'class', 2)" class="active-tabl\
e-tab">New Classes</button><button id="class-tab4" role="tab" aria-selected="false" \
aria-controls="class.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="s\
how('class', 'class-tab4', 2)" class="table-tab">Added in 1.2</button></div>
<div id="class.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="class-tab0">
<div class="table-header col-first">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color class class-tab4"><a href="mdl/pkg/\
TestClass.html" title="class in pkg">pkg.TestClass</a></div>
<div class="col-last even-row-color class class-tab4">
<div class="block">TestClass declaration.</div>
</div>""",
"""
<div id="enum-class">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="enu\
m-class-tab0" role="tab" aria-selected="true" aria-controls="enum-class.tabpanel" ta\
bindex="0" onkeydown="switchTab(event)" onclick="show('enum-class', 'enum-class', 2)\
" class="active-table-tab">New Enum Classes</button><button id="enum-class-tab6" rol\
e="tab" aria-selected="false" aria-controls="enum-class.tabpanel" tabindex="-1" onke\
ydown="switchTab(event)" onclick="show('enum-class', 'enum-class-tab6', 2)" class="t\
able-tab">Added in 0.9</button></div>
<div id="enum-class.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="enum-class-tab0">
<div class="table-header col-first">Enum Class</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color enum-class enum-class-tab6"><a href\
="mdl/pkg/TestEnum.html" title="enum class in pkg">pkg.TestEnum</a></div>
<div class="col-last even-row-color enum-class enum-class-tab6">
<div class="block">Test enum class.</div>
</div>""",
"""
<div id="exception">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="exc\
eption-tab0" role="tab" aria-selected="true" aria-controls="exception.tabpanel" tabi\
ndex="0" onkeydown="switchTab(event)" onclick="show('exception', 'exception', 2)" cl\
ass="active-table-tab">New Exceptions</button><button id="exception-tab6" role="tab"\
aria-selected="false" aria-controls="exception.tabpanel" tabindex="-1" onkeydown="s\
witchTab(event)" onclick="show('exception', 'exception-tab6', 2)" class="table-tab">\
Added in 0.9</button></div>
<div id="exception.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="exception-tab0">
<div class="table-header col-first">Exceptions</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color exception exception-tab6"><a href="\
mdl/pkg/TestException.html" title="class in pkg">pkg.TestException</a></div>
<div class="col-last even-row-color exception exception-tab6">
<div class="block">Test exception class.</div>
</div>""",
"""
<div id="error">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="err\
or-tab0" role="tab" aria-selected="true" aria-controls="error.tabpanel" tabindex="0"\
onkeydown="switchTab(event)" onclick="show('error', 'error', 2)" class="active-tabl\
e-tab">New Errors</button><button id="error-tab3" role="tab" aria-selected="false" a\
ria-controls="error.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="sh\
ow('error', 'error-tab3', 2)" class="table-tab">Added in 2.0b</button></div>
<div id="error.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="error-tab0">
<div class="table-header col-first">Errors</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color error error-tab3"><a href="mdl/pkg/\
TestError.html" title="class in pkg">pkg.TestError</a></div>
<div class="col-last even-row-color error error-tab3">
<div class="block">Test error class.</div>
</div>""",
"""
<div id="record-class">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="rec\
ord-class-tab0" role="tab" aria-selected="true" aria-controls="record-class.tabpanel\
" tabindex="0" onkeydown="switchTab(event)" onclick="show('record-class', 'record-cl\
ass', 2)" class="active-table-tab">New Record Classes</button><button id="record-cla\
ss-tab2" role="tab" aria-selected="false" aria-controls="record-class.tabpanel" tabi\
ndex="-1" onkeydown="switchTab(event)" onclick="show('record-class', 'record-class-t\
ab2', 2)" class="table-tab">Added in 3.2</button></div>
<div id="record-class.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="record-class-tab0">
<div class="table-header col-first">Record Class</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color record-class record-class-tab2"><a \
href="mdl/pkg/TestRecord.html" title="class in pkg">pkg.TestRecord</a></div>
<div class="col-last even-row-color record-class record-class-tab2">
<div class="block">Test record.</div>
</div>""",
"""
<div id="annotation-interface">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="ann\
otation-interface-tab0" role="tab" aria-selected="true" aria-controls="annotation-in\
terface.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('annotatio\
n-interface', 'annotation-interface', 2)" class="active-table-tab">New Annotation In\
terfaces</button><button id="annotation-interface-tab3" role="tab" aria-selected="fa\
lse" aria-controls="annotation-interface.tabpanel" tabindex="-1" onkeydown="switchTa\
b(event)" onclick="show('annotation-interface', 'annotation-interface-tab3', 2)" cla\
ss="table-tab">Added in 2.0b</button></div>
<div id="annotation-interface.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="annotation-interface-tab0">
<div class="table-header col-first">Annotation Interface</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color annotation-interface annotation-int\
erface-tab3"><a href="mdl/pkg/TestAnnotation.html" title="annotation interface in pk\
g">pkg.TestAnnotation</a></div>
<div class="col-last even-row-color annotation-interface annotation-interface-tab3">
<div class="block">An annotation interface.</div>
</div>""",
"""
<div id="field">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="fie\
ld-tab0" role="tab" aria-selected="true" aria-controls="field.tabpanel" tabindex="0"\
onkeydown="switchTab(event)" onclick="show('field', 'field', 2)" class="active-tabl\
e-tab">New Fields</button><button id="field-tab2" role="tab" aria-selected="false" a\
ria-controls="field.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="sh\
ow('field', 'field-tab2', 2)" class="table-tab">Added in 3.2</button><button id="fie\
ld-tab3" role="tab" aria-selected="false" aria-controls="field.tabpanel" tabindex="-\
1" onkeydown="switchTab(event)" onclick="show('field', 'field-tab3', 2)" class="tabl\
e-tab">Added in 2.0b</button><button id="field-tab4" role="tab" aria-selected="false\
" aria-controls="field.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick=\
"show('field', 'field-tab4', 2)" class="table-tab">Added in 1.2</button><button id="\
field-tab5" role="tab" aria-selected="false" aria-controls="field.tabpanel" tabindex\
="-1" onkeydown="switchTab(event)" onclick="show('field', 'field-tab5', 2)" class="t\
able-tab">Added in v1.0</button></div>
<div id="field.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="field-tab0">
<div class="table-header col-first">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color field field-tab4"><a href="mdl/pkg/\
TestClass.html#field">pkg.TestClass.field</a></div>
<div class="col-last even-row-color field field-tab4">
<div class="block">TestClass field.</div>
</div>
<div class="col-summary-item-name odd-row-color field field-tab5"><a href="mdl/pkg/T\
estError.html#field">pkg.TestError.field</a></div>
<div class="col-last odd-row-color field field-tab5">
<div class="block">Test error field.</div>
</div>
<div class="col-summary-item-name even-row-color field field-tab2"><a href="mdl/pkg/\
TestException.html#field">pkg.TestException.field</a></div>
<div class="col-last even-row-color field field-tab2">
<div class="block">Exception field.</div>
</div>
<div class="col-summary-item-name odd-row-color field field-tab3"><a href="mdl/pkg/T\
estInterface.html#field">pkg.TestInterface.field</a></div>
<div class="col-last odd-row-color field field-tab3">
<div class="block">Test interface field.</div>
</div>""",
"""
<div id="method">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="met\
hod-tab0" role="tab" aria-selected="true" aria-controls="method.tabpanel" tabindex="\
0" onkeydown="switchTab(event)" onclick="show('method', 'method', 2)" class="active-\
table-tab">New Methods</button><button id="method-tab1" role="tab" aria-selected="fa\
lse" aria-controls="method.tabpanel" tabindex="-1" onkeydown="switchTab(event)" oncl\
ick="show('method', 'method-tab1', 2)" class="table-tab">Added in 5</button><button \
id="method-tab2" role="tab" aria-selected="false" aria-controls="method.tabpanel" ta\
bindex="-1" onkeydown="switchTab(event)" onclick="show('method', 'method-tab2', 2)" \
class="table-tab">Added in 3.2</button><button id="method-tab3" role="tab" aria-sele\
cted="false" aria-controls="method.tabpanel" tabindex="-1" onkeydown="switchTab(even\
t)" onclick="show('method', 'method-tab3', 2)" class="table-tab">Added in 2.0b</butt\
on><button id="method-tab4" role="tab" aria-selected="false" aria-controls="method.t\
abpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method', 'method-\
tab4', 2)" class="table-tab">Added in 1.2</button><button id="method-tab5" role="tab\
" aria-selected="false" aria-controls="method.tabpanel" tabindex="-1" onkeydown="swi\
tchTab(event)" onclick="show('method', 'method-tab5', 2)" class="table-tab">Added in\
v1.0</button></div>
<div id="method.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="method-tab0">
<div class="table-header col-first">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color method method-tab2"><a href="mdl/pk\
g/TestAnnotation.html#optional()">pkg.TestAnnotation.optional()</a></div>
<div class="col-last even-row-color method method-tab2">
<div class="block">Optional annotation interface element.</div>
</div>
<div class="col-summary-item-name odd-row-color method method-tab3"><a href="mdl/pkg\
/TestAnnotation.html#required()">pkg.TestAnnotation.required()</a></div>
<div class="col-last odd-row-color method method-tab3">
<div class="block">Required annotation interface element.</div>
</div>
<div class="col-summary-item-name even-row-color method method-tab3"><a href="mdl/pk\
g/TestClass.html#method()">pkg.TestClass.method()</a></div>
<div class="col-last even-row-color method method-tab3">
<div class="block">TestClass method.</div>
</div>
<div class="col-summary-item-name odd-row-color method method-tab1"><a href="mdl/pkg\
/TestClass.html#overloadedMethod(java.lang.String)">pkg.TestClass.overloadedMethod<w\
br>(String)</a></div>
<div class="col-last odd-row-color method method-tab1">
<div class="block">TestClass overloaded method.</div>
</div>
<div class="col-summary-item-name even-row-color method method-tab2"><a href="mdl/pk\
g/TestError.html#method()">pkg.TestError.method()</a></div>
<div class="col-last even-row-color method method-tab2">
<div class="block">Test error method.</div>
</div>
<div class="col-summary-item-name odd-row-color method method-tab4"><a href="mdl/pkg\
/TestException.html#method()">pkg.TestException.method()</a></div>
<div class="col-last odd-row-color method method-tab4">
<div class="block">Exception method.</div>
</div>
<div class="col-summary-item-name even-row-color method method-tab5"><a href="mdl/pk\
g/TestInterface.html#method1()">pkg.TestInterface.method1()</a></div>
<div class="col-last even-row-color method method-tab5">
<div class="block">Interface method.</div>
</div>
<div class="col-summary-item-name odd-row-color method method-tab2"><a href="mdl/pkg\
/TestInterface.html#method2(java.lang.Class)">pkg.TestInterface.method2<wbr>(Class&l\
t;?&gt;)</a></div>
<div class="col-last odd-row-color method method-tab2">
<div class="block">Interface method.</div>
</div>
<div class="col-summary-item-name even-row-color method method-tab1"><a href="mdl/pk\
g/TestRecord.html#x()">pkg.TestRecord.x()</a></div>
<div class="col-last even-row-color method method-tab1">
<div class="block">Test record getter.</div>
</div>""",
"""
<div id="constructor">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="con\
structor-tab0" role="tab" aria-selected="true" aria-controls="constructor.tabpanel" \
tabindex="0" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor'\
, 2)" class="active-table-tab">New Constructors</button><button id="constructor-tab1\
" role="tab" aria-selected="false" aria-controls="constructor.tabpanel" tabindex="-1\
" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor-tab1', 2)" \
class="table-tab">Added in 5</button><button id="constructor-tab2" role="tab" aria-s\
elected="false" aria-controls="constructor.tabpanel" tabindex="-1" onkeydown="switch\
Tab(event)" onclick="show('constructor', 'constructor-tab2', 2)" class="table-tab">A\
dded in 3.2</button><button id="constructor-tab3" role="tab" aria-selected="false" a\
ria-controls="constructor.tabpanel" tabindex="-1" onkeydown="switchTab(event)" oncli\
ck="show('constructor', 'constructor-tab3', 2)" class="table-tab">Added in 2.0b</but\
ton></div>
<div id="constructor.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="constructor-tab0">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color constructor constructor-tab3"><a hr\
ef="mdl/pkg/TestClass.html#%3Cinit%3E()">pkg.TestClass()</a></div>
<div class="col-last even-row-color constructor constructor-tab3">
<div class="block">TestClass constructor.</div>
</div>
<div class="col-summary-item-name odd-row-color constructor constructor-tab2"><a hre\
f="mdl/pkg/TestClass.html#%3Cinit%3E(java.lang.String)">pkg.TestClass<wbr>(String)</\
a></div>
<div class="col-last odd-row-color constructor constructor-tab2">
<div class="block">TestClass constructor.</div>
</div>
<div class="col-summary-item-name even-row-color constructor constructor-tab1"><a hr\
ef="mdl/pkg/TestError.html#%3Cinit%3E()">pkg.TestError()</a></div>
<div class="col-last even-row-color constructor constructor-tab1">
<div class="block">Test error constructor.</div>
</div>
<div class="col-summary-item-name odd-row-color constructor constructor-tab1"><a hre\
f="mdl/pkg/TestException.html#%3Cinit%3E()">pkg.TestException()</a></div>
<div class="col-last odd-row-color constructor constructor-tab1">
<div class="block">Exception constructor.</div>
</div>""",
"""
<div id="enum-constant">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="enu\
m-constant-tab0" role="tab" aria-selected="true" aria-controls="enum-constant.tabpan\
el" tabindex="0" onkeydown="switchTab(event)" onclick="show('enum-constant', 'enum-c\
onstant', 2)" class="active-table-tab">New Enum Constants</button><button id="enum-c\
onstant-tab2" role="tab" aria-selected="false" aria-controls="enum-constant.tabpanel\
" tabindex="-1" onkeydown="switchTab(event)" onclick="show('enum-constant', 'enum-co\
nstant-tab2', 2)" class="table-tab">Added in 3.2</button><button id="enum-constant-t\
ab4" role="tab" aria-selected="false" aria-controls="enum-constant.tabpanel" tabinde\
x="-1" onkeydown="switchTab(event)" onclick="show('enum-constant', 'enum-constant-ta\
b4', 2)" class="table-tab">Added in 1.2</button><button id="enum-constant-tab5" role\
="tab" aria-selected="false" aria-controls="enum-constant.tabpanel" tabindex="-1" on\
keydown="switchTab(event)" onclick="show('enum-constant', 'enum-constant-tab5', 2)" \
class="table-tab">Added in v1.0</button><button id="enum-constant-tab6" role="tab" a\
ria-selected="false" aria-controls="enum-constant.tabpanel" tabindex="-1" onkeydown=\
"switchTab(event)" onclick="show('enum-constant', 'enum-constant-tab6', 2)" class="t\
able-tab">Added in 0.9</button></div>
<div id="enum-constant.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="enum-constant-tab0">
<div class="table-header col-first">Enum Constant</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color enum-constant enum-constant-tab2"><\
a href="mdl/pkg/TestEnum.html#DEPRECATED">pkg.TestEnum.DEPRECATED</a></div>
<div class="col-last even-row-color enum-constant enum-constant-tab2">
<div class="block">Deprecated.</div>
</div>
<div class="col-summary-item-name odd-row-color enum-constant enum-constant-tab6"><a\
href="mdl/pkg/TestEnum.html#ONE">pkg.TestEnum.ONE</a></div>
<div class="col-last odd-row-color enum-constant enum-constant-tab6">
<div class="block">One.</div>
</div>
<div class="col-summary-item-name even-row-color enum-constant enum-constant-tab4"><\
a href="mdl/pkg/TestEnum.html#THREE">pkg.TestEnum.THREE</a></div>
<div class="col-last even-row-color enum-constant enum-constant-tab4">
<div class="block">Three.</div>
</div>
<div class="col-summary-item-name odd-row-color enum-constant enum-constant-tab5"><a\
href="mdl/pkg/TestEnum.html#TWO">pkg.TestEnum.TWO</a></div>
<div class="col-last odd-row-color enum-constant enum-constant-tab5">
<div class="block">Two.</div>
</div>""",
"""
<div id="annotation-interface-member">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="ann\
otation-interface-member-tab0" role="tab" aria-selected="true" aria-controls="annota\
tion-interface-member.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="s\
how('annotation-interface-member', 'annotation-interface-member', 2)" class="active-\
table-tab">New Annotation Interface Elements</button><button id="annotation-interfac\
e-member-tab2" role="tab" aria-selected="false" aria-controls="annotation-interface-\
member.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('annotatio\
n-interface-member', 'annotation-interface-member-tab2', 2)" class="table-tab">Added\
in 3.2</button><button id="annotation-interface-member-tab3" role="tab" aria-select\
ed="false" aria-controls="annotation-interface-member.tabpanel" tabindex="-1" onkeyd\
own="switchTab(event)" onclick="show('annotation-interface-member', 'annotation-inte\
rface-member-tab3', 2)" class="table-tab">Added in 2.0b</button></div>
<div id="annotation-interface-member.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="annotation-interface-member-tab0">
<div class="table-header col-first">Annotation Interface Element</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color annotation-interface-member annotat\
ion-interface-member-tab2"><a href="mdl/pkg/TestAnnotation.html#optional()">pkg.Test\
Annotation.optional()</a></div>
<div class="col-last even-row-color annotation-interface-member annotation-interface-member-tab2">
<div class="block">Optional annotation interface element.</div>
</div>
<div class="col-summary-item-name odd-row-color annotation-interface-member annotati\
on-interface-member-tab3"><a href="mdl/pkg/TestAnnotation.html#required()">pkg.TestA\
nnotation.required()</a></div>
<div class="col-last odd-row-color annotation-interface-member annotation-interface-member-tab3">
<div class="block">Required annotation interface element.</div>
</div>""");
}
private void checkMultiReleaseDeprecatedElements() {
checkOutput("deprecated-list.html", true,
"""
<div id="for-removal">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="for\
-removal-tab0" role="tab" aria-selected="true" aria-controls="for-removal.tabpanel" \
tabindex="0" onkeydown="switchTab(event)" onclick="show('for-removal', 'for-removal'\
, 2)" class="active-table-tab">Terminally Deprecated Elements</button><button id="fo\
r-removal-tab1" role="tab" aria-selected="false" aria-controls="for-removal.tabpanel\
" tabindex="-1" onkeydown="switchTab(event)" onclick="show('for-removal', 'for-remov\
al-tab1', 2)" class="table-tab">Terminally Deprecated in 5</button></div>
<div id="for-removal.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="for-removal-tab0">
<div class="table-header col-first">Element</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color for-removal for-removal-tab1"><a hr\
ef="mdl/pkg/TestAnnotation.html#required()">pkg.TestAnnotation.required()</a></div>
<div class="col-last even-row-color for-removal for-removal-tab1"></div>
</div>""",
"""
<div id="method">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="met\
hod-tab0" role="tab" aria-selected="true" aria-controls="method.tabpanel" tabindex="\
0" onkeydown="switchTab(event)" onclick="show('method', 'method', 2)" class="active-\
table-tab">Deprecated Methods</button><button id="method-tab1" role="tab" aria-selec\
ted="false" aria-controls="method.tabpanel" tabindex="-1" onkeydown="switchTab(event\
)" onclick="show('method', 'method-tab1', 2)" class="table-tab">Deprecated in 5</but\
ton></div>
<div id="method.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="method-tab0">
<div class="table-header col-first">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color method method-tab1"><a href="mdl/pk\
g/TestAnnotation.html#required()">pkg.TestAnnotation.required()</a></div>
<div class="col-last even-row-color method method-tab1"></div>
</div>""",
"""
<div id="constructor">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="con\
structor-tab0" role="tab" aria-selected="true" aria-controls="constructor.tabpanel" \
tabindex="0" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor'\
, 2)" class="active-table-tab">Deprecated Constructors</button><button id="construct\
or-tab1" role="tab" aria-selected="false" aria-controls="constructor.tabpanel" tabin\
dex="-1" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor-tab1\
', 2)" class="table-tab">Deprecated in 5</button></div>
<div id="constructor.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="constructor-tab0">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color constructor constructor-tab1"><a hr\
ef="mdl/pkg/TestClass.html#%3Cinit%3E()">pkg.TestClass()</a></div>
<div class="col-last even-row-color constructor constructor-tab1"></div>
</div>""",
"""
<div id="enum-constant">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="enu\
m-constant-tab0" role="tab" aria-selected="true" aria-controls="enum-constant.tabpan\
el" tabindex="0" onkeydown="switchTab(event)" onclick="show('enum-constant', 'enum-c\
onstant', 2)" class="active-table-tab">Deprecated Enum Constants</button><button id=\
"enum-constant-tab1" role="tab" aria-selected="false" aria-controls="enum-constant.t\
abpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('enum-constant', '\
enum-constant-tab1', 2)" class="table-tab">Deprecated in 5</button></div>
<div id="enum-constant.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="enum-constant-tab0">
<div class="table-header col-first">Enum Constant</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color enum-constant enum-constant-tab1"><\
a href="mdl/pkg/TestEnum.html#DEPRECATED">pkg.TestEnum.DEPRECATED</a></div>
<div class="col-last even-row-color enum-constant enum-constant-tab1"></div>
</div>""",
"""
<div id="annotation-interface-member">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="ann\
otation-interface-member-tab0" role="tab" aria-selected="true" aria-controls="annota\
tion-interface-member.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="s\
how('annotation-interface-member', 'annotation-interface-member', 2)" class="active-\
table-tab">Deprecated Annotation Interface Elements</button><button id="annotation-i\
nterface-member-tab1" role="tab" aria-selected="false" aria-controls="annotation-int\
erface-member.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('an\
notation-interface-member', 'annotation-interface-member-tab1', 2)" class="table-tab\
">Deprecated in 5</button></div>
<div id="annotation-interface-member.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="annotation-interface-member-tab0">
<div class="table-header col-first">Annotation Interface Element</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color annotation-interface-member annotat\
ion-interface-member-tab1"><a href="mdl/pkg/TestAnnotation.html#required()">pkg.Test\
Annotation.required()</a></div>
<div class="col-last even-row-color annotation-interface-member annotation-interface-member-tab1"></div>
</div>""");
}
private void checkSingleReleaseContents() {
checkOutput("new-list.html", true,
"""
<h1 title="New API" class="title">New API</h1>
<h2 title="Contents">Contents</h2>
<ul>
<li><a href="#method">Methods</a></li>
<li><a href="#constructor">Constructors</a></li>
</ul>
</div>
<ul class="block-list">""");
}
private void checkSingleReleaseNewElements() {
checkOutput("new-list.html", true,
"""
<div id="method">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="met\
hod-tab0" role="tab" aria-selected="true" aria-controls="method.tabpanel" tabindex="\
0" onkeydown="switchTab(event)" onclick="show('method', 'method', 2)" class="active-\
table-tab">New Methods</button><button id="method-tab1" role="tab" aria-selected="fa\
lse" aria-controls="method.tabpanel" tabindex="-1" onkeydown="switchTab(event)" oncl\
ick="show('method', 'method-tab1', 2)" class="table-tab">New Methods</button></div>
<div id="method.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="method-tab0">
<div class="table-header col-first">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color method method-tab1"><a href="mdl/pk\
g/TestClass.html#overloadedMethod(java.lang.String)">pkg.TestClass.overloadedMethod<\
wbr>(String)</a></div>
<div class="col-last even-row-color method method-tab1">
<div class="block">TestClass overloaded method.</div>
</div>
<div class="col-summary-item-name odd-row-color method method-tab1"><a href="mdl/pkg\
/TestRecord.html#x()">pkg.TestRecord.x()</a></div>
<div class="col-last odd-row-color method method-tab1">
<div class="block">Test record getter.</div>
</div>""",
"""
<div id="constructor">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="con\
structor-tab0" role="tab" aria-selected="true" aria-controls="constructor.tabpanel" \
tabindex="0" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor'\
, 2)" class="active-table-tab">New Constructors</button><button id="constructor-tab1\
" role="tab" aria-selected="false" aria-controls="constructor.tabpanel" tabindex="-1\
" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor-tab1', 2)" \
class="table-tab">New Constructors</button></div>
<div id="constructor.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="constructor-tab0">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color constructor constructor-tab1"><a hr\
ef="mdl/pkg/TestError.html#%3Cinit%3E()">pkg.TestError()</a></div>
<div class="col-last even-row-color constructor constructor-tab1">
<div class="block">Test error constructor.</div>
</div>
<div class="col-summary-item-name odd-row-color constructor constructor-tab1"><a hre\
f="mdl/pkg/TestException.html#%3Cinit%3E()">pkg.TestException()</a></div>
<div class="col-last odd-row-color constructor constructor-tab1">
<div class="block">Exception constructor.</div>
</div>""");
}
private void checkSingleReleaseDeprecatedElements() {
checkOutput("deprecated-list.html", true,
"""
<h1 title="Deprecated API" class="title">Deprecated API</h1>
<h2 title="Contents">Contents</h2>
<ul>
<li><a href="#for-removal">Terminally Deprecated</a></li>
<li><a href="#method">Methods</a></li>
<li><a href="#constructor">Constructors</a></li>
<li><a href="#enum-constant">Enum Constants</a></li>
<li><a href="#annotation-interface-member">Annotation Interface Elements</a></li>
</ul>
</div>
<ul class="block-list">""",
"""
<div id="for-removal">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="for\
-removal-tab0" role="tab" aria-selected="true" aria-controls="for-removal.tabpanel" \
tabindex="0" onkeydown="switchTab(event)" onclick="show('for-removal', 'for-removal'\
, 2)" class="active-table-tab">Terminally Deprecated Elements</button><button id="fo\
r-removal-tab1" role="tab" aria-selected="false" aria-controls="for-removal.tabpanel\
" tabindex="-1" onkeydown="switchTab(event)" onclick="show('for-removal', 'for-remov\
al-tab1', 2)" class="table-tab">Terminally Deprecated in 5</button></div>
<div id="for-removal.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="for-removal-tab0">
<div class="table-header col-first">Element</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color for-removal for-removal-tab1"><a hr\
ef="mdl/pkg/TestAnnotation.html#required()">pkg.TestAnnotation.required()</a></div>
<div class="col-last even-row-color for-removal for-removal-tab1"></div>
</div>""",
"""
<div id="method">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="met\
hod-tab0" role="tab" aria-selected="true" aria-controls="method.tabpanel" tabindex="\
0" onkeydown="switchTab(event)" onclick="show('method', 'method', 2)" class="active-\
table-tab">Deprecated Methods</button><button id="method-tab1" role="tab" aria-selec\
ted="false" aria-controls="method.tabpanel" tabindex="-1" onkeydown="switchTab(event\
)" onclick="show('method', 'method-tab1', 2)" class="table-tab">Deprecated in 5</but\
ton></div>
<div id="method.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="method-tab0">
<div class="table-header col-first">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color method method-tab1"><a href="mdl/pk\
g/TestAnnotation.html#required()">pkg.TestAnnotation.required()</a></div>
<div class="col-last even-row-color method method-tab1"></div>
</div>""",
"""
<div id="constructor">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="con\
structor-tab0" role="tab" aria-selected="true" aria-controls="constructor.tabpanel" \
tabindex="0" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor'\
, 2)" class="active-table-tab">Deprecated Constructors</button><button id="construct\
or-tab1" role="tab" aria-selected="false" aria-controls="constructor.tabpanel" tabin\
dex="-1" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor-tab1\
', 2)" class="table-tab">Deprecated in 5</button></div>
<div id="constructor.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="constructor-tab0">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color constructor constructor-tab1"><a hr\
ef="mdl/pkg/TestClass.html#%3Cinit%3E()">pkg.TestClass()</a></div>
<div class="col-last even-row-color constructor constructor-tab1"></div>
</div>""");
}
private void checkPackageContents() {
checkOutput("new-list.html", true,
"""
<h1 title="New API" class="title">New API</h1>
<h2 title="Contents">Contents</h2>
<ul>
<li><a href="#class">Classes</a></li>
<li><a href="#field">Fields</a></li>
<li><a href="#method">Methods</a></li>
<li><a href="#constructor">Constructors</a></li>
</ul>
</div>
<span class="help-note">(The leftmost tab "New ..." indicates all the new elements, \
regardless of the releases in which they were added. Each of the other tabs "Added i\
n ..." indicates the new elements added in a specific release. Any element shown und\
er the leftmost tab is also shown under one of the righthand tabs.)</span>""");
}
private void checkPackageNewElements() {
checkOutput("new-list.html", true,
"""
<div id="class">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="cla\
ss-tab0" role="tab" aria-selected="true" aria-controls="class.tabpanel" tabindex="0"\
onkeydown="switchTab(event)" onclick="show('class', 'class', 2)" class="active-tabl\
e-tab">New Classes</button><button id="class-tab5" role="tab" aria-selected="false" \
aria-controls="class.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="s\
how('class', 'class-tab5', 2)" class="table-tab">Added in 1.2</button></div>
<div id="class.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="class-tab0">
<div class="table-header col-first">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color class class-tab5"><a href="pkg/Test\
Class.html" title="class in pkg">pkg.TestClass</a></div>
<div class="col-last even-row-color class class-tab5">
<div class="block">TestClass declaration.</div>
</div>""",
"""
<div id="field">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="fie\
ld-tab0" role="tab" aria-selected="true" aria-controls="field.tabpanel" tabindex="0"\
onkeydown="switchTab(event)" onclick="show('field', 'field', 2)" class="active-tabl\
e-tab">New Fields</button><button id="field-tab5" role="tab" aria-selected="false" a\
ria-controls="field.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="sh\
ow('field', 'field-tab5', 2)" class="table-tab">Added in 1.2</button></div>
<div id="field.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="field-tab0">
<div class="table-header col-first">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color field field-tab5"><a href="pkg/Test\
Class.html#field">pkg.TestClass.field</a></div>
<div class="col-last even-row-color field field-tab5">
<div class="block">TestClass field.</div>
</div>""",
"""
<div id="method">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="met\
hod-tab0" role="tab" aria-selected="true" aria-controls="method.tabpanel" tabindex="\
0" onkeydown="switchTab(event)" onclick="show('method', 'method', 2)" class="active-\
table-tab">New Methods</button><button id="method-tab1" role="tab" aria-selected="fa\
lse" aria-controls="method.tabpanel" tabindex="-1" onkeydown="switchTab(event)" oncl\
ick="show('method', 'method-tab1', 2)" class="table-tab">Added in 6</button><button \
id="method-tab2" role="tab" aria-selected="false" aria-controls="method.tabpanel" ta\
bindex="-1" onkeydown="switchTab(event)" onclick="show('method', 'method-tab2', 2)" \
class="table-tab">Added in 5</button><button id="method-tab4" role="tab" aria-select\
ed="false" aria-controls="method.tabpanel" tabindex="-1" onkeydown="switchTab(event)\
" onclick="show('method', 'method-tab4', 2)" class="table-tab">Added in 2.0b</button\
></div>
<div id="method.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="method-tab0">
<div class="table-header col-first">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color method method-tab4"><a href="pkg/Te\
stClass.html#method()">pkg.TestClass.method()</a></div>
<div class="col-last even-row-color method method-tab4">
<div class="block">TestClass method.</div>
</div>
<div class="col-summary-item-name odd-row-color method method-tab1"><a href="pkg/Tes\
tClass.html#overloadedMethod(int)">pkg.TestClass.overloadedMethod<wbr>(int)</a></div>
<div class="col-last odd-row-color method method-tab1">
<div class="block">TestClass overloaded method.</div>
</div>
<div class="col-summary-item-name even-row-color method method-tab2"><a href="pkg/Te\
stClass.html#overloadedMethod(java.lang.String)">pkg.TestClass.overloadedMethod<wbr>\
(String)</a></div>
<div class="col-last even-row-color method method-tab2">
<div class="block">TestClass overloaded method.</div>
</div>""",
"""
<div id="constructor">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="con\
structor-tab0" role="tab" aria-selected="true" aria-controls="constructor.tabpanel" \
tabindex="0" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor'\
, 2)" class="active-table-tab">New Constructors</button><button id="constructor-tab3\
" role="tab" aria-selected="false" aria-controls="constructor.tabpanel" tabindex="-1\
" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor-tab3', 2)" \
class="table-tab">Added in 3.2</button><button id="constructor-tab4" role="tab" aria\
-selected="false" aria-controls="constructor.tabpanel" tabindex="-1" onkeydown="swit\
chTab(event)" onclick="show('constructor', 'constructor-tab4', 2)" class="table-tab"\
>Added in 2.0b</button></div>
<div id="constructor.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="constructor-tab0">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color constructor constructor-tab4"><a hr\
ef="pkg/TestClass.html#%3Cinit%3E()">pkg.TestClass()</a></div>
<div class="col-last even-row-color constructor constructor-tab4">
<div class="block">TestClass constructor.</div>
</div>
<div class="col-summary-item-name odd-row-color constructor constructor-tab3"><a hre\
f="pkg/TestClass.html#%3Cinit%3E(java.lang.String)">pkg.TestClass<wbr>(String)</a></div>
<div class="col-last odd-row-color constructor constructor-tab3">
<div class="block">TestClass constructor.</div>
</div>""");
}
private void checkPackageDeprecatedElements() {
checkOutput("deprecated-list.html", true,
"""
<h1 title="Deprecated API" class="title">Deprecated API</h1>
<h2 title="Contents">Contents</h2>
<ul>
<li><a href="#constructor">Constructors</a></li>
</ul>
</div>
<span class="help-note">(The leftmost tab "Deprecated ..." indicates all the depreca\
ted elements, regardless of the releases in which they were deprecated. Each of the \
other tabs "Deprecated in ..." indicates the elements deprecated in a specific relea\
se.)</span>
""",
"""
<div id="constructor">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="con\
structor-tab0" role="tab" aria-selected="true" aria-controls="constructor.tabpanel" \
tabindex="0" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor'\
, 2)" class="active-table-tab">Deprecated Constructors</button><button id="construct\
or-tab2" role="tab" aria-selected="false" aria-controls="constructor.tabpanel" tabin\
dex="-1" onkeydown="switchTab(event)" onclick="show('constructor', 'constructor-tab2\
', 2)" class="table-tab">Deprecated in 5</button></div>
<div id="constructor.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="constructor-tab0">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-summary-item-name even-row-color constructor constructor-tab2"><a hr\
ef="pkg/TestClass.html#%3Cinit%3E()">pkg.TestClass()</a></div>
<div class="col-last even-row-color constructor constructor-tab2"></div>
</div>""");
}
}

View File

@ -0,0 +1,30 @@
/*
* Copyright (c) 2021, 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 mdl.
* @since 3.2
*/
module mdl {
exports pkg;
}

View File

@ -0,0 +1,51 @@
/*
* Copyright (c) 2021, 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 pkg;
import java.lang.annotation.Documented;
/**
* An annotation interface.
* @since 2.0b
*/
@Documented public @interface TestAnnotation {
/**
* Optional annotation interface element.
* @since 3.2
*/
String optional() default "unknown";
/**
* Required annotation interface element.
* @since 2.0b
*/
@Deprecated(forRemoval=true,since="5")
int required();
/**
* @since 6
*/
int field = 0;
}

View File

@ -0,0 +1,68 @@
/*
* Copyright (c) 2021, 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 pkg;
/**
* TestClass declaration.
* @since 1.2
*/
public class TestClass {
/**
* TestClass field.
* @since 1.2
*/
public int field;
/**
* TestClass constructor.
* @since 2.0b
*/
@Deprecated(since="5")
public TestClass() {}
/**
* TestClass constructor.
* @since 3.2
*/
public TestClass(String s) {}
/**
* TestClass method.
* @since 2.0b
*/
public void method() {}
/**
* TestClass overloaded method.
* @since 5
*/
public void overloadedMethod(String s) {}
/**
* TestClass overloaded method.
* @since 6
*/
public void overloadedMethod(int i) {}
}

View File

@ -0,0 +1,53 @@
/*
* Copyright (c) 2021, 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 pkg;
/**
* Test enum class.
* @since 0.9
*/
public enum TestEnum {
/**
* One.
* @since 0.9
*/
ONE,
/**
* Two.
* @since v1.0
*/
TWO,
/**
* Three.
* @since 1.2
*/
THREE,
/**
* Deprecated.
* @since 3.2
*/
@Deprecated(since="5")
DEPRECATED;
}

View File

@ -0,0 +1,49 @@
/*
* Copyright (c) 2021, 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 pkg;
/**
* Test error class.
* @since 2.0b
*/
public class TestError extends Error {
/**
* Test error field.
* @since v1.0
*/
public int field;
/**
* Test error constructor.
* @since 5
*/
public TestError() {}
/**
* Test error method.
* @since 3.2
*/
public void method() {}
}

View File

@ -0,0 +1,49 @@
/*
* Copyright (c) 2021, 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 pkg;
/**
* Test exception class.
* @since 0.9
*/
public class TestException extends Exception {
/**
* Exception field.
* @since 3.2
*/
public int field;
/**
* Exception constructor.
* @since 5
*/
public TestException() {}
/**
* Exception method.
* @since 1.2
*/
public void method() {}
}

View File

@ -0,0 +1,49 @@
/*
* Copyright (c) 2021, 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 pkg;
/**
* Test interface.
* @since 0.9
*/
public interface TestInterface {
/**
* Test interface field.
* @since 2.0b
*/
int field = 1;
/**
* Interface method.
* @since v1.0
*/
void method1();
/**
* Interface method.
* @since 3.2
*/
void method2(Class<?> c);
}

View File

@ -0,0 +1,41 @@
/*
* Copyright (c) 2021, 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 pkg;
/**
* Test record.
* @since 3.2
*/
public record TestRecord(int x, int y) {
/**
* Test record getter.
* @return x
* @since 5
*/
@Override
public int x() {
return x;
}
}

View File

@ -0,0 +1,28 @@
/*
* Copyright (c) 2021, 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 pkg.
* @since v1.0
*/
package pkg;

View File

@ -0,0 +1,68 @@
/*
* Copyright (c) 2021, 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 pkg;
/**
* TestClass declaration.
* @since 1.2
*/
public class TestClass {
/**
* TestClass field.
* @since 1.2
*/
public int field;
/**
* TestClass constructor.
* @since 2.0b
*/
@Deprecated(since="5")
public TestClass() {}
/**
* TestClass constructor.
* @since 3.2
*/
public TestClass(String s) {}
/**
* TestClass method.
* @since 2.0b
*/
public void method() {}
/**
* TestClass overloaded method.
* @since 5
*/
public void overloadedMethod(String s) {}
/**
* TestClass overloaded method.
* @since 6
*/
public void overloadedMethod(int i) {}
}

View File

@ -520,7 +520,7 @@ public class TestRecordTypes extends JavadocTester {
</ul>""",
"""
<div id="record-class">
<div class="caption"><span>Record Classes</span></div>
<div class="caption"><span>Deprecated Record Classes</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Record Class</div>
<div class="table-header col-last">Description</div>
@ -552,7 +552,7 @@ public class TestRecordTypes extends JavadocTester {
</ul>""",
"""
<div id="method">
<div class="caption"><span>Methods</span></div>
<div class="caption"><span>Deprecated Methods</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Method</div>
<div class="table-header col-last">Description</div>