8238467: Clean up annotations on overridden/implemented methods

Reviewed-by: jjg
This commit is contained in:
Pavel Rappo 2020-02-04 22:05:31 +00:00
parent 9d7777e585
commit 029f547700
54 changed files with 175 additions and 948 deletions

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020, 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
@ -72,6 +72,7 @@ public class JavadocTaskImpl implements DocumentationTask {
setLocale(Locale.getDefault());
}
@Override
public void setLocale(Locale locale) {
if (used.get())
throw new IllegalStateException();
@ -88,6 +89,7 @@ public class JavadocTaskImpl implements DocumentationTask {
}
}
@Override
public Boolean call() {
if (!used.getAndSet(true)) {
initContext();

@ -62,7 +62,8 @@ import jdk.javadoc.internal.tool.ToolOptions;
* or deletion without notice.</b></p>
*/
public class JavadocTool implements DocumentationTool {
// @Override // can't add @Override until bootstrap JDK provides Tool.name()
@Override
public String name() {
return "javadoc";
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, 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
@ -82,9 +82,6 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
return writer.getTypeParameterLinks(linkInfo);
}
/**
* {@inheritDoc}
*/
@Override
protected Content getDeprecatedLink(Element member) {
Content deprecatedLinkContent = new ContentBuilder();

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2020, 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
@ -62,9 +62,7 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
super(writer, annotationType);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement,
Content memberSummaryTree) {
memberSummaryTree.add(
@ -74,31 +72,23 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
return memberTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberTreeHeader() {
return writer.getMemberTreeHeader();
}
/**
* {@inheritDoc}
*/
@Override
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
writer.addMemberTree(HtmlStyle.fieldSummary,
SectionName.ANNOTATION_TYPE_FIELD_SUMMARY, memberSummaryTree, memberTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addAnnotationFieldDetailsMarker(Content memberDetails) {
memberDetails.add(MarkerComments.START_OF_ANNOTATION_TYPE_FIELD_DETAILS);
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationDetailsTreeHeader() {
Content memberDetailsTree = new ContentBuilder();
if (!writer.printedAnnotationFieldHeading) {
@ -110,9 +100,7 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
return memberDetailsTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationDocTreeHeader(Element member) {
Content annotationDocTree = new ContentBuilder();
Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING,
@ -121,39 +109,29 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
return HtmlTree.SECTION(HtmlStyle.detail, annotationDocTree).setId(name(member));
}
/**
* {@inheritDoc}
*/
@Override
public Content getSignature(Element member) {
return new MemberSignature(member)
.addType(getType(member))
.toContent();
}
/**
* {@inheritDoc}
*/
@Override
public void addDeprecated(Element member, Content annotationDocTree) {
addDeprecatedInfo(member, annotationDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addComments(Element member, Content annotationDocTree) {
addComment(member, annotationDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addTags(Element member, Content annotationDocTree) {
writer.addTagsInfo(member, annotationDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree) {
Content annotationDetails = new ContentBuilder();
annotationDetails.add(annotationDetailsTreeHeader);
@ -162,25 +140,18 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
.setId(SectionName.ANNOTATION_TYPE_FIELD_DETAIL.getName()));
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationDoc(Content annotationDocTree) {
return getMemberTree(annotationDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
HtmlTree label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
contents.fieldSummaryLabel);
memberTree.add(label);
}
/**
* {@inheritDoc}
*/
@Override
public TableHeader getSummaryTableHeader(Element member) {
return new TableHeader(contents.modifierAndTypeLabel, contents.fields,
@ -201,16 +172,10 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colSecond, HtmlStyle.colLast);
}
/**
* {@inheritDoc}
*/
@Override
public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
Content tdSummary) {
@ -220,24 +185,18 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
tdSummary.add(code);
}
/**
* {@inheritDoc}
*/
@Override
protected void addInheritedSummaryLink(TypeElement typeElement,
Element member, Content linksTree) {
//Not applicable.
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
addModifierAndType(member, getType(member), tdSummaryType);
}
/**
* {@inheritDoc}
*/
@Override
protected Content getDeprecatedLink(Element member) {
return writer.getDocLink(LinkInfoImpl.Kind.MEMBER,
member, utils.getFullyQualifiedName(member));

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -63,9 +63,6 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
super(writer, annotationType);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement,
Content memberSummaryTree) {
@ -76,18 +73,12 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
return memberTree;
}
/**
* {@inheritDoc}
*/
@Override
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
writer.addMemberTree(HtmlStyle.memberSummary,
SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY, memberSummaryTree, memberTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addDefaultValueInfo(Element member, Content annotationDocTree) {
if (utils.isAnnotationType(member)) {
@ -103,9 +94,6 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
}
}
/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@ -113,17 +101,11 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
memberTree.add(label);
}
/**
* {@inheritDoc}
*/
@Override
protected Content getCaption() {
return contents.getContent("doclet.Annotation_Type_Optional_Members");
}
/**
* {@inheritDoc}
*/
@Override
public TableHeader getSummaryTableHeader(Element member) {
return new TableHeader(contents.modifierAndTypeLabel,

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -63,9 +63,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
super(writer, annotationType);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement,
Content memberSummaryTree) {
memberSummaryTree.add(
@ -75,31 +73,23 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
return memberTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberTreeHeader() {
return writer.getMemberTreeHeader();
}
/**
* {@inheritDoc}
*/
@Override
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
writer.addMemberTree(HtmlStyle.memberSummary,
SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY, memberSummaryTree, memberTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addAnnotationDetailsMarker(Content memberDetails) {
memberDetails.add(MarkerComments.START_OF_ANNOTATION_TYPE_DETAILS);
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationDetailsTreeHeader() {
Content memberDetailsTree = new ContentBuilder();
if (!writer.printedAnnotationHeading) {
@ -111,9 +101,6 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
return memberDetailsTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationDocTreeHeader(Element member) {
String simpleName = name(member);
@ -125,54 +112,40 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
.setId(simpleName + utils.signature((ExecutableElement) member));
}
/**
* {@inheritDoc}
*/
@Override
public Content getSignature(Element member) {
return new MemberSignature(member)
.addType(getType(member))
.toContent();
}
/**
* {@inheritDoc}
*/
@Override
public void addDeprecated(Element member, Content annotationDocTree) {
addDeprecatedInfo(member, annotationDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addComments(Element member, Content annotationDocTree) {
addComment(member, annotationDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addTags(Element member, Content annotationDocTree) {
writer.addTagsInfo(member, annotationDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree) {
Content annotationDetails = new ContentBuilder(annotationDetailsTreeHeader, annotationDetailsTree);
return getMemberTree(HtmlTree.SECTION(HtmlStyle.memberDetails, annotationDetails));
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationDoc(Content annotationDocTree) {
return getMemberTree(annotationDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
HtmlTree label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
contents.annotateTypeRequiredMemberSummaryLabel);
@ -188,18 +161,12 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
return contents.getContent("doclet.Annotation_Type_Required_Members");
}
/**
* {@inheritDoc}
*/
@Override
public TableHeader getSummaryTableHeader(Element member) {
return new TableHeader(contents.modifierAndTypeLabel,
contents.annotationTypeRequiredMemberLabel, contents.descriptionLabel);
}
/**
* {@inheritDoc}
*/
@Override
protected Table createSummaryTable() {
return new Table(HtmlStyle.memberSummary)
@ -209,15 +176,11 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colSecond, HtmlStyle.colLast);
}
/**
* {@inheritDoc}
*/
@Override
public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
Content tdSummary) {
Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
@ -226,24 +189,18 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
tdSummary.add(code);
}
/**
* {@inheritDoc}
*/
@Override
protected void addInheritedSummaryLink(TypeElement typeElement,
Element member, Content linksTree) {
//Not applicable.
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
addModifierAndType(member, getType(member), tdSummaryType);
}
/**
* {@inheritDoc}
*/
@Override
protected Content getDeprecatedLink(Element member) {
String name = utils.getFullyQualifiedName(member) + "." + member.getSimpleName();
return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, member, name);

@ -78,9 +78,6 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
this.navBar = new Navigation(annotationType, configuration, PageMode.CLASS, path);
}
/**
* {@inheritDoc}
*/
@Override
public Content getHeader(String header) {
Content headerContent = new ContentBuilder();
@ -123,17 +120,11 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
return getBody(getWindowTitle(utils.getSimpleName(annotationType)));
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationContentHeader() {
return getContentHeader();
}
/**
* {@inheritDoc}
*/
@Override
public void addFooter() {
Content htmlTree = HtmlTree.FOOTER();
@ -144,9 +135,6 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
.setFooter(htmlTree);
}
/**
* {@inheritDoc}
*/
@Override
public void printDocument(Content contentTree) throws DocFileIOException {
String description = getDescription("declaration", annotationType);
@ -157,25 +145,16 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
description, localStylesheets, contentTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationInfoTreeHeader() {
return getMemberTreeHeader();
}
/**
* {@inheritDoc}
*/
@Override
public Content getAnnotationInfo(Content annotationInfoTree) {
return HtmlTree.SECTION(HtmlStyle.description, annotationInfoTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree) {
Content hr = new HtmlTree(HtmlTag.HR);
@ -198,9 +177,6 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
annotationInfoTree.add(pre);
}
/**
* {@inheritDoc}
*/
@Override
public void addAnnotationTypeDescription(Content annotationInfoTree) {
if (!options.noComment()) {
@ -210,9 +186,6 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
}
}
/**
* {@inheritDoc}
*/
@Override
public void addAnnotationTypeTagInfo(Content annotationInfoTree) {
if (!options.noComment()) {
@ -220,9 +193,6 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
}
}
/**
* {@inheritDoc}
*/
@Override
public void addAnnotationTypeDeprecationInfo(Content annotationInfoTree) {
List<? extends DocTree> deprs = utils.getBlockTags(annotationType, DocTree.Kind.DEPRECATED);
@ -241,17 +211,11 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
}
}
/**
* {@inheritDoc}
*/
@Override
public TypeElement getAnnotationTypeElement() {
return annotationType;
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberDetailsTree(Content contentTree) {
return HtmlTree.SECTION(HtmlStyle.details, contentTree)

@ -105,9 +105,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
this.navBar = new Navigation(typeElement, configuration, PageMode.CLASS, path);
}
/**
* {@inheritDoc}
*/
@Override
public Content getHeader(String header) {
HtmlTree bodyTree = getBody(getWindowTitle(utils.getSimpleName(typeElement)));
@ -154,17 +151,11 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
return bodyTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getClassContentHeader() {
return getContentHeader();
}
/**
* {@inheritDoc}
*/
@Override
public void addFooter() {
bodyContents.addMainContent(MarkerComments.END_OF_CLASS_DATA);
@ -175,9 +166,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
bodyContents.setFooter(htmlTree);
}
/**
* {@inheritDoc}
*/
@Override
public void printDocument(Content contentTree) throws DocFileIOException {
String description = getDescription("declaration", typeElement);
@ -188,33 +176,21 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
description, localStylesheets, contentTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getClassInfoTreeHeader() {
return getMemberTreeHeader();
}
/**
* {@inheritDoc}
*/
@Override
public Content getClassInfo(Content classInfoTree) {
return getMemberTree(HtmlStyle.description, classInfoTree);
}
/**
* {@inheritDoc}
*/
@Override
protected TypeElement getCurrentPageElement() {
return typeElement;
}
/**
* {@inheritDoc}
*/
@Override @SuppressWarnings("preview")
public void addClassSignature(String modifiers, Content classInfoTree) {
Content hr = new HtmlTree(HtmlTag.HR);
@ -294,9 +270,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
return content;
}
/**
* {@inheritDoc}
*/
@Override
public void addClassDescription(Content classInfoTree) {
if (!options.noComment()) {
@ -307,9 +280,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
}
}
/**
* {@inheritDoc}
*/
@Override
public void addClassTagInfo(Content classInfoTree) {
if (!options.noComment()) {
@ -367,9 +337,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
return content;
}
/**
* {@inheritDoc}
*/
@Override
public void addClassTree(Content classContentTree) {
if (!utils.isClass(typeElement)) {
@ -378,9 +345,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
classContentTree.add(getClassInheritanceTree(typeElement.asType()));
}
/**
* {@inheritDoc}
*/
@Override
public void addParamInfo(Content classInfoTree) {
if (utils.hasBlockTag(typeElement, DocTree.Kind.PARAM)) {
@ -392,9 +356,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
}
}
/**
* {@inheritDoc}
*/
@Override
public void addSubClassInfo(Content classInfoTree) {
if (utils.isClass(typeElement)) {
@ -415,9 +376,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
}
}
/**
* {@inheritDoc}
*/
@Override
public void addSubInterfacesInfo(Content classInfoTree) {
if (utils.isInterface(typeElement)) {
@ -433,9 +391,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
}
}
/**
* {@inheritDoc}
*/
@Override
public void addInterfaceUsageInfo (Content classInfoTree) {
if (!utils.isInterface(typeElement)) {
@ -457,9 +412,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
}
}
/**
* {@inheritDoc}
*/
@Override
public void addImplementedInterfacesInfo(Content classInfoTree) {
SortedSet<TypeMirror> interfaces = new TreeSet<>(utils.makeTypeMirrorClassUseComparator());
@ -473,9 +425,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
}
}
/**
* {@inheritDoc}
*/
@Override
public void addSuperInterfacesInfo(Content classInfoTree) {
SortedSet<TypeMirror> interfaces =
@ -491,9 +440,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
}
}
/**
* {@inheritDoc}
*/
@Override
public void addNestedClassInfo(final Content classInfoTree) {
Element outerClass = typeElement.getEnclosingElement();
@ -517,9 +463,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
}.visit(outerClass);
}
/**
* {@inheritDoc}
*/
@Override
public void addFunctionalInterfaceInfo (Content classInfoTree) {
if (isFunctionalInterface()) {
@ -543,9 +486,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
}
/**
* {@inheritDoc}
*/
@Override
public void addClassDeprecationInfo(Content classInfoTree) {
List<? extends DocTree> deprs = utils.getBlockTags(typeElement, DocTree.Kind.DEPRECATED);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2020, 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
@ -95,9 +95,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
this.navBar = new Navigation(null, configuration, PageMode.CONSTANTVALUES, path);
}
/**
* {@inheritDoc}
*/
@Override
public Content getHeader() {
String label = resources.getText("doclet.Constants_Summary");
@ -110,17 +107,11 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
return bodyTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getContentsHeader() {
return new HtmlTree(HtmlTag.UL);
}
/**
* {@inheritDoc}
*/
@Override
public void addLinkToPackageContent(PackageElement pkg,
Set<PackageElement> printedPackageHeaders, Content contentListTree) {
@ -141,9 +132,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
contentListTree.add(HtmlTree.LI(link));
}
/**
* {@inheritDoc}
*/
@Override
public void addContentsList(Content contentListTree) {
Content titleContent = contents.constantsSummaryTitle;
@ -159,9 +147,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
bodyContents.addMainContent(div);
}
/**
* {@inheritDoc}
*/
@Override
public Content getConstantSummaries() {
HtmlTree summariesDiv = new HtmlTree(HtmlTag.DIV);
@ -169,9 +154,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
return summariesDiv;
}
/**
* {@inheritDoc}
*/
@Override
public void addPackageName(PackageElement pkg, Content summariesTree, boolean first) {
Content pkgNameContent;
@ -195,9 +177,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
.setId(links.getName(anchorName));
}
/**
* {@inheritDoc}
*/
@Override
public Content getClassConstantHeader() {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
@ -205,17 +184,11 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
return ul;
}
/**
* {@inheritDoc}
*/
@Override
public void addClassConstant(Content summariesTree, Content classConstantTree) {
summaryTree.add(classConstantTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addConstantMembers(TypeElement typeElement, Collection<VariableElement> fields,
Content classConstantTree) {
@ -294,9 +267,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
return HtmlTree.CODE(valueContent);
}
/**
* {@inheritDoc}
*/
@Override
public void addConstantSummaries(Content summariesTree) {
if (summaryTree != null) {
@ -305,9 +275,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
bodyContents.addMainContent(summariesTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addFooter() {
Content htmlTree = HtmlTree.FOOTER();
@ -317,9 +284,6 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter implements Cons
bodyContents.setFooter(htmlTree);
}
/**
* {@inheritDoc}
*/
@Override
public void printDocument(Content contentTree) throws DocFileIOException {
contentTree.add(bodyContents.toContent());

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, 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
@ -89,9 +89,6 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
super(writer);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement,
Content memberSummaryTree) {
@ -101,18 +98,12 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
return memberTree;
}
/**
* {@inheritDoc}
*/
@Override
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
writer.addMemberTree(HtmlStyle.constructorSummary,
SectionName.CONSTRUCTOR_SUMMARY, memberSummaryTree, memberTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getConstructorDetailsTreeHeader(Content memberDetailsTree) {
memberDetailsTree.add(MarkerComments.START_OF_CONSTRUCTOR_DETAILS);
@ -123,9 +114,6 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
return constructorDetailsTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getConstructorDocTreeHeader(ExecutableElement constructor) {
String erasureAnchor;
@ -140,9 +128,6 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
.setId(links.getName(writer.getAnchor(constructor)));
}
/**
* {@inheritDoc}
*/
@Override
public Content getSignature(ExecutableElement constructor) {
return new MemberSignature(constructor)
@ -151,33 +136,21 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
.toContent();
}
/**
* {@inheritDoc}
*/
@Override
public void addDeprecated(ExecutableElement constructor, Content constructorDocTree) {
addDeprecatedInfo(constructor, constructorDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addComments(ExecutableElement constructor, Content constructorDocTree) {
addComment(constructor, constructorDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addTags(ExecutableElement constructor, Content constructorDocTree) {
writer.addTagsInfo(constructor, constructorDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getConstructorDetails(Content constructorDetailsTreeHeader, Content constructorDetailsTree) {
Content constructorDetails = new ContentBuilder(constructorDetailsTreeHeader, constructorDetailsTree);
@ -185,9 +158,6 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
.setId(SectionName.CONSTRUCTOR_DETAIL.getName()));
}
/**
* {@inheritDoc}
*/
@Override
public Content getConstructorDoc(Content constructorDocTree) {
return getMemberTree(constructorDocTree);
@ -203,9 +173,6 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
this.foundNonPubConstructor = foundNonPubConstructor;
}
/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@ -213,9 +180,6 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
memberTree.add(label);
}
/**
* {@inheritDoc}
*/
@Override
public TableHeader getSummaryTableHeader(Element member) {
if (foundNonPubConstructor) {
@ -247,16 +211,10 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
.setColumnStyles(bodyRowStyles);
}
/**
* {@inheritDoc}
*/
@Override
public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
if (foundNonPubConstructor) {

@ -106,7 +106,7 @@ public class DocFilesHandlerImpl implements DocFilesHandler {
* @throws DocFileIOException if there is a problem while copying
* the documentation files
*/
@Override
public void copyDocFiles() throws DocFileIOException {
boolean first = true;
for (DocFile srcdir : DocFile.list(configuration, location, source)) {
@ -129,6 +129,7 @@ public class DocFilesHandlerImpl implements DocFilesHandler {
}
}
@Override
public List<DocPath> getStylesheets() throws DocFileIOException {
List<DocPath> stylesheets = new ArrayList<DocPath>();
for (DocFile srcdir : DocFile.list(configuration, location, source)) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -59,9 +59,6 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
super(writer);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement,
Content memberSummaryTree) {
@ -71,18 +68,12 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
return memberTree;
}
/**
* {@inheritDoc}
*/
@Override
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
writer.addMemberTree(HtmlStyle.constantsSummary,
SectionName.ENUM_CONSTANT_SUMMARY, memberSummaryTree, memberTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getEnumConstantsDetailsTreeHeader(TypeElement typeElement,
Content memberDetailsTree) {
@ -94,9 +85,6 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
return enumConstantsDetailsTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getEnumConstantsTreeHeader(VariableElement enumConstant,
Content enumConstantsDetailsTree) {
@ -108,9 +96,6 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
.setId(name(enumConstant));
}
/**
* {@inheritDoc}
*/
@Override
public Content getSignature(VariableElement enumConstant) {
return new MemberSignature(enumConstant)
@ -118,33 +103,21 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
.toContent();
}
/**
* {@inheritDoc}
*/
@Override
public void addDeprecated(VariableElement enumConstant, Content enumConstantsTree) {
addDeprecatedInfo(enumConstant, enumConstantsTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addComments(VariableElement enumConstant, Content enumConstantsTree) {
addComment(enumConstant, enumConstantsTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addTags(VariableElement enumConstant, Content enumConstantsTree) {
writer.addTagsInfo(enumConstant, enumConstantsTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getEnumConstantsDetails(Content enumConstantsDetailsTreeHeader,
Content enumConstantsDetailsTree) {
@ -154,17 +127,11 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
.setId(SectionName.ENUM_CONSTANT_DETAIL.getName()));
}
/**
* {@inheritDoc}
*/
@Override
public Content getEnumConstants(Content enumConstantsTree) {
return getMemberTree(enumConstantsTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@ -172,17 +139,11 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
memberTree.add(label);
}
/**
* {@inheritDoc}
*/
@Override
public TableHeader getSummaryTableHeader(Element member) {
return new TableHeader(contents.enumConstantLabel, contents.descriptionLabel);
}
/**
* {@inheritDoc}
*/
@Override
protected Table createSummaryTable() {
return new Table(HtmlStyle.memberSummary)
@ -191,16 +152,10 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colLast);
}
/**
* {@inheritDoc}
*/
@Override
public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
Content tdSummary) {
@ -210,24 +165,15 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
tdSummary.add(code);
}
/**
* {@inheritDoc}
*/
@Override
protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
//Not applicable.
}
/**
* {@inheritDoc}
*/
@Override
protected Content getDeprecatedLink(Element member) {
String name = utils.getFullyQualifiedName(member) + "." + member.getSimpleName();

@ -62,9 +62,6 @@ public class FieldWriterImpl extends AbstractMemberWriter
super(writer);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement,
Content memberSummaryTree) {
@ -74,18 +71,12 @@ public class FieldWriterImpl extends AbstractMemberWriter
return memberTree;
}
/**
* {@inheritDoc}
*/
@Override
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
writer.addMemberTree(HtmlStyle.fieldSummary,
SectionName.FIELD_SUMMARY, memberSummaryTree, memberTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getFieldDetailsTreeHeader(Content memberDetailsTree) {
memberDetailsTree.add(MarkerComments.START_OF_FIELD_DETAILS);
@ -96,9 +87,6 @@ public class FieldWriterImpl extends AbstractMemberWriter
return fieldDetailsTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getFieldDocTreeHeader(VariableElement field) {
Content fieldTree = new ContentBuilder();
@ -108,9 +96,6 @@ public class FieldWriterImpl extends AbstractMemberWriter
return HtmlTree.SECTION(HtmlStyle.detail, fieldTree).setId(name(field));
}
/**
* {@inheritDoc}
*/
@Override
public Content getSignature(VariableElement field) {
return new MemberSignature(field)
@ -118,17 +103,11 @@ public class FieldWriterImpl extends AbstractMemberWriter
.toContent();
}
/**
* {@inheritDoc}
*/
@Override
public void addDeprecated(VariableElement field, Content fieldTree) {
addDeprecatedInfo(field, fieldTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addComments(VariableElement field, Content fieldTree) {
if (!utils.getFullBody(field).isEmpty()) {
@ -136,17 +115,11 @@ public class FieldWriterImpl extends AbstractMemberWriter
}
}
/**
* {@inheritDoc}
*/
@Override
public void addTags(VariableElement field, Content fieldTree) {
writer.addTagsInfo(field, fieldTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getFieldDetails(Content fieldDetailsTreeHeader, Content fieldDetailsTree) {
Content fieldDetails = new ContentBuilder(fieldDetailsTreeHeader, fieldDetailsTree);
@ -154,17 +127,11 @@ public class FieldWriterImpl extends AbstractMemberWriter
.setId(SectionName.FIELD_DETAIL.getName()));
}
/**
* {@inheritDoc}
*/
@Override
public Content getFieldDoc(Content fieldTree) {
return getMemberTree(fieldTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@ -172,9 +139,6 @@ public class FieldWriterImpl extends AbstractMemberWriter
memberTree.add(label);
}
/**
* {@inheritDoc}
*/
@Override
public TableHeader getSummaryTableHeader(Element member) {
return new TableHeader(contents.modifierAndTypeLabel, contents.fieldLabel,
@ -193,9 +157,6 @@ public class FieldWriterImpl extends AbstractMemberWriter
.setColumnStyles(bodyRowStyles);
}
/**
* {@inheritDoc}
*/
@Override
public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
Content classLink = writer.getPreQualifiedClassLink(
@ -219,9 +180,6 @@ public class FieldWriterImpl extends AbstractMemberWriter
inheritedTree.add(labelHeading);
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
Content tdSummary) {
@ -231,9 +189,6 @@ public class FieldWriterImpl extends AbstractMemberWriter
tdSummary.add(code);
}
/**
* {@inheritDoc}
*/
@Override
protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
linksTree.add(
@ -241,17 +196,11 @@ public class FieldWriterImpl extends AbstractMemberWriter
name(member), false));
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
addModifierAndType(member, utils.asInstantiatedFieldType(typeElement, (VariableElement)member), tdSummaryType);
}
/**
* {@inheritDoc}
*/
@Override
protected Content getDeprecatedLink(Element member) {
String name = utils.getFullyQualifiedName(member) + "." + member.getSimpleName();

@ -258,17 +258,11 @@ public class HtmlConfiguration extends BaseConfiguration {
}
}
/**
* {@inheritDoc}
*/
@Override
public WriterFactory getWriterFactory() {
return new WriterFactoryImpl(this);
}
/**
* {@inheritDoc}
*/
@Override
public Locale getLocale() {
if (locale == null)
@ -306,9 +300,6 @@ public class HtmlConfiguration extends BaseConfiguration {
.collect(Collectors.toList());
}
/**
* {@inheritDoc}
*/
@Override
public JavaFileManager getFileManager() {
return docEnv.getJavaFileManager();

@ -228,9 +228,6 @@ public class HtmlDoclet extends AbstractDoclet {
}
}
/**
* {@inheritDoc}
*/
@Override // defined by AbstractDoclet
protected void generateClassFiles(SortedSet<TypeElement> typeElems, ClassTree classTree)
throws DocletException {
@ -252,9 +249,6 @@ public class HtmlDoclet extends AbstractDoclet {
}
}
/**
* {@inheritDoc}
*/
@Override // defined by AbstractDoclet
protected void generateModuleFiles() throws DocletException {
if (configuration.showModules) {
@ -267,9 +261,6 @@ public class HtmlDoclet extends AbstractDoclet {
}
}
/**
* {@inheritDoc}
*/
@Override // defined by AbstractDoclet
protected void generatePackageFiles(ClassTree classtree) throws DocletException {
HtmlOptions options = configuration.getOptions();

@ -70,6 +70,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
*
* @return a content tree for the header
*/
@Override
public Content getSerializableFieldsHeader() {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setStyle(HtmlStyle.blockList);
@ -82,6 +83,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param isLastContent true if the content being documented is the last content.
* @return a content tree for the header
*/
@Override
public Content getFieldsContentHeader(boolean isLastContent) {
HtmlTree li = new HtmlTree(HtmlTag.LI);
li.setStyle(HtmlStyle.blockList);
@ -96,6 +98,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* content tree
* @return a content tree for the serializable fields content
*/
@Override
public Content getSerializableFields(String heading, Content serializableFieldsTree) {
HtmlTree section = HtmlTree.SECTION(HtmlStyle.detail);
if (serializableFieldsTree.isValid()) {
@ -146,6 +149,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param field the field to document.
* @param contentTree the tree to which the deprecated info will be added
*/
@Override
public void addMemberDeprecatedInfo(VariableElement field, Content contentTree) {
addDeprecatedInfo(field, contentTree);
}
@ -156,6 +160,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param field the field to document.
* @param contentTree the tree to which the deprecated info will be added
*/
@Override
public void addMemberDescription(VariableElement field, Content contentTree) {
if (!utils.getFullBody(field).isEmpty()) {
writer.addInlineComment(field, contentTree);
@ -172,6 +177,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param serialFieldTag the field to document (represented by tag)
* @param contentTree the tree to which the deprecated info will be added
*/
@Override
public void addMemberDescription(VariableElement field, DocTree serialFieldTag, Content contentTree) {
CommentHelper ch = utils.getCommentHelper(field);
List<? extends DocTree> description = ch.getDescription(configuration, serialFieldTag);
@ -188,6 +194,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param field the field to document.
* @param contentTree the tree to which the member tags info will be added
*/
@Override
public void addMemberTags(VariableElement field, Content contentTree) {
Content tagContent = new ContentBuilder();
TagletWriter.genTagOutput(configuration.tagletManager, field,
@ -206,6 +213,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param field the field to check overview details for.
* @return true if overview details need to be printed
*/
@Override
public boolean shouldPrintOverview(VariableElement field) {
if (!options.noComment()) {
if(!utils.getFullBody(field).isEmpty() ||

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020, 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
@ -60,6 +60,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
*
* @return a content tree for the header
*/
@Override
public Content getSerializableMethodsHeader() {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setStyle(HtmlStyle.blockList);
@ -72,6 +73,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
* @param isLastContent true if the content being documented is the last content.
* @return a content tree for the header
*/
@Override
public Content getMethodsContentHeader(boolean isLastContent) {
HtmlTree li = new HtmlTree(HtmlTag.LI);
li.setStyle(HtmlStyle.blockList);
@ -86,6 +88,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
* content tree
* @return a content tree for the serializable methods content
*/
@Override
public Content getSerializableMethods(String heading, Content serializableMethodContent) {
Content headingContent = new StringContent(heading);
Content serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent);
@ -100,6 +103,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
* @param msg the message to be displayed
* @return no customization message content
*/
@Override
public Content getNoCustomizationMsg(String msg) {
Content noCustomizationMsg = new StringContent(msg);
return noCustomizationMsg;
@ -111,6 +115,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
* @param member the method document to be listed
* @param methodsContentTree the content tree to which the member header will be added
*/
@Override
public void addMemberHeader(ExecutableElement member, Content methodsContentTree) {
Content memberContent = new StringContent(name(member));
Content heading = HtmlTree.HEADING(Headings.SerializedForm.MEMBER_HEADING, memberContent);
@ -124,6 +129,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
* @param member the method to document.
* @param methodsContentTree the tree to which the deprecated info will be added
*/
@Override
public void addDeprecatedMemberInfo(ExecutableElement member, Content methodsContentTree) {
addDeprecatedInfo(member, methodsContentTree);
}
@ -134,6 +140,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
* @param member the method to document.
* @param methodsContentTree the tree to which the deprecated info will be added
*/
@Override
public void addMemberDescription(ExecutableElement member, Content methodsContentTree) {
addComment(member, methodsContentTree);
}
@ -144,6 +151,7 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
* @param member the method to document.
* @param methodsContentTree the tree to which the member tags info will be added
*/
@Override
public void addMemberTags(ExecutableElement member, Content methodsContentTree) {
Content tagContent = new ContentBuilder();
TagletManager tagletManager =

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -64,17 +64,11 @@ public class LinkFactoryImpl extends LinkFactory {
docPaths = writer.configuration.docPaths;
}
/**
* {@inheritDoc}
*/
@Override
protected Content newContent() {
return new ContentBuilder();
}
/**
* {@inheritDoc}
*/
@Override
protected Content getClassLink(LinkInfo linkInfo) {
BaseConfiguration configuration = m_writer.configuration;
@ -129,9 +123,6 @@ public class LinkFactoryImpl extends LinkFactory {
return link;
}
/**
* {@inheritDoc}
*/
@Override
protected Content getTypeParameterLinks(LinkInfo linkInfo, boolean isClassLabel) {
Content links = newContent();

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -254,9 +254,6 @@ public class LinkInfoImpl extends LinkInfo {
setContext(context);
}
/**
* {@inheritDoc}
*/
@Override
protected Content newContent() {
return new ContentBuilder();
@ -340,16 +337,11 @@ public class LinkInfoImpl extends LinkInfo {
return this;
}
/**
* {@inheritDoc}
*/
public Kind getContext() {
return context;
}
/**
* {@inheritDoc}
*
* This method sets the link attributes to the appropriate values
* based on the context.
*

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -49,24 +49,18 @@ public class LinkOutputImpl implements LinkOutput {
output = new StringBuilder();
}
/**
* {@inheritDoc}
*/
@Override
public void append(Object o) {
output.append(o instanceof String ?
(String) o : ((LinkOutputImpl)o).toString());
}
/**
* {@inheritDoc}
*/
@Override
public void insert(int offset, Object o) {
output.insert(offset, o.toString());
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return output.toString();
}

@ -76,9 +76,6 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
super(writer);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree) {
memberSummaryTree.add(MarkerComments.START_OF_METHOD_SUMMARY);
@ -87,18 +84,12 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
return memberTree;
}
/**
* {@inheritDoc}
*/
@Override
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
writer.addMemberTree(HtmlStyle.methodSummary,
SectionName.METHOD_SUMMARY, memberSummaryTree, memberTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMethodDetailsTreeHeader(Content memberDetailsTree) {
memberDetailsTree.add(MarkerComments.START_OF_METHOD_DETAILS);
@ -109,9 +100,6 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
return methodDetailsTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getMethodDocTreeHeader(ExecutableElement method) {
String erasureAnchor;
@ -142,17 +130,11 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
.toContent();
}
/**
* {@inheritDoc}
*/
@Override
public void addDeprecated(ExecutableElement method, Content methodDocTree) {
addDeprecatedInfo(method, methodDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addComments(TypeMirror holderType, ExecutableElement method, Content methodDocTree) {
TypeElement holder = utils.asTypeElement(holderType);
@ -182,17 +164,11 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
}
}
/**
* {@inheritDoc}
*/
@Override
public void addTags(ExecutableElement method, Content methodDocTree) {
writer.addTagsInfo(method, methodDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMethodDetails(Content methodDetailsTreeHeader, Content methodDetailsTree) {
Content methodDetails = new ContentBuilder(methodDetailsTreeHeader, methodDetailsTree);
@ -200,17 +176,11 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
.setId(SectionName.METHOD_DETAIL.getName()));
}
/**
* {@inheritDoc}
*/
@Override
public Content getMethodDoc(Content methodDocTree) {
return getMemberTree(methodDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@ -218,9 +188,6 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
memberTree.add(label);
}
/**
* {@inheritDoc}
*/
@Override
public TableHeader getSummaryTableHeader(Element member) {
return new TableHeader(contents.modifierAndTypeLabel, contents.methodLabel,
@ -245,9 +212,6 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
.setTabScript(i -> "show(" + i + ");");
}
/**
* {@inheritDoc}
*/
@Override
public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
Content classLink = writer.getPreQualifiedClassLink(
@ -271,18 +235,12 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
inheritedTree.add(labelHeading);
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
ExecutableElement meth = (ExecutableElement)member;
addModifierAndType(meth, utils.getReturnType(typeElement, meth), tdSummaryType);
}
/**
* {@inheritDoc}
*/
protected static void addOverridden(HtmlDocletWriter writer,
TypeMirror overriddenType, ExecutableElement method, Content dl) {
if (writer.options.noComment()) {
@ -330,9 +288,6 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
}
}
/**
* {@inheritDoc}
*/
protected static void addImplementsInfo(HtmlDocletWriter writer,
ExecutableElement method, Content dl) {
Utils utils = writer.utils;

@ -485,9 +485,6 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
.setColumnStyles(HtmlStyle.colFirst, HtmlStyle.colSecond, HtmlStyle.colLast);
}
/**
* {@inheritDoc}
*/
@Override
public void addModulesSummary(Content summaryContentTree) {
if (display(requires) || display(indirectModules)) {
@ -711,9 +708,6 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
}
}
/**
* {@inheritDoc}
*/
@Override
public void addServicesSummary(Content summaryContentTree) {
@ -842,9 +836,6 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
}
}
/**
* {@inheritDoc}
*/
@Override
public void addModuleDescription(Content moduleContentTree) {
if (!utils.getFullBody(mdle).isEmpty()) {
@ -857,9 +848,6 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
}
}
/**
* {@inheritDoc}
*/
@Override
public void addModuleTags(Content moduleContentTree) {
Content tree = HtmlTree.SECTION(HtmlStyle.moduleTags);
@ -867,17 +855,11 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
moduleContentTree.add(tree);
}
/**
* {@inheritDoc}
*/
@Override
public void addModuleContent(Content moduleContentTree) {
bodyContents.addMainContent(moduleContentTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addModuleFooter() {
Content htmlTree = HtmlTree.FOOTER();
@ -887,11 +869,6 @@ public class ModuleWriterImpl extends HtmlDocletWriter implements ModuleSummaryW
bodyContents.setFooter(htmlTree);
}
/**
* {@inheritDoc}
*
* @throws jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException
*/
@Override
public void printDocument(Content contentTree) throws DocFileIOException {
contentTree.add(bodyContents.toContent());

@ -60,9 +60,6 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
super(writer);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement,
Content memberSummaryTree) {
@ -72,18 +69,12 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
return memberTree;
}
/**
* {@inheritDoc}
*/
@Override
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
writer.addMemberTree(HtmlStyle.nestedClassSummary,
SectionName.NESTED_CLASS_SUMMARY, memberSummaryTree, memberTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@ -91,9 +82,6 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
memberTree.add(label);
}
/**
* {@inheritDoc}
*/
@Override
public TableHeader getSummaryTableHeader(Element member) {
Content label = utils.isInterface(member) ?
@ -114,9 +102,6 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
.setColumnStyles(bodyRowStyles);
}
/**
* {@inheritDoc}
*/
@Override
public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
Content classLink = writer.getPreQualifiedClassLink(
@ -139,9 +124,6 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
inheritedTree.add(labelHeading);
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
Content tdSummary) {
@ -151,9 +133,6 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
tdSummary.add(code);
}
/**
* {@inheritDoc}
*/
@Override
protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
linksTree.add(
@ -161,17 +140,11 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
(TypeElement)member)));
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
addModifierAndType(member, null, tdSummaryType);
}
/**
* {@inheritDoc}
*/
@Override
protected Content getDeprecatedLink(Element member) {
return writer.getQualifiedClassLink(LinkInfoImpl.Kind.MEMBER, member);

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, 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
@ -97,9 +97,6 @@ public class PackageWriterImpl extends HtmlDocletWriter
this.navBar = new Navigation(packageElement, configuration, PageMode.PACKAGE, path);
}
/**
* {@inheritDoc}
*/
@Override
public Content getPackageHeader(String heading) {
HtmlTree bodyTree = getBody(getWindowTitle(utils.getPackageName(packageElement)));
@ -135,9 +132,6 @@ public class PackageWriterImpl extends HtmlDocletWriter
return bodyTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getContentHeader() {
HtmlTree div = new HtmlTree(HtmlTag.DIV);
@ -168,9 +162,6 @@ public class PackageWriterImpl extends HtmlDocletWriter
}
}
/**
* {@inheritDoc}
*/
@Override
public Content getSummaryHeader() {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
@ -178,63 +169,42 @@ public class PackageWriterImpl extends HtmlDocletWriter
return ul;
}
/**
* {@inheritDoc}
*/
@Override
public void addInterfaceSummary(SortedSet<TypeElement> interfaces, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.interfaceLabel, contents.descriptionLabel);
addClassesSummary(interfaces, resources.interfaceSummary, tableHeader, summaryContentTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addClassSummary(SortedSet<TypeElement> classes, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.classLabel, contents.descriptionLabel);
addClassesSummary(classes, resources.classSummary, tableHeader, summaryContentTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addEnumSummary(SortedSet<TypeElement> enums, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.enum_, contents.descriptionLabel);
addClassesSummary(enums, resources.enumSummary, tableHeader, summaryContentTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addRecordSummary(SortedSet<TypeElement> records, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.record, contents.descriptionLabel);
addClassesSummary(records, resources.recordSummary, tableHeader, summaryContentTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addExceptionSummary(SortedSet<TypeElement> exceptions, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.exception, contents.descriptionLabel);
addClassesSummary(exceptions, resources.exceptionSummary, tableHeader, summaryContentTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addErrorSummary(SortedSet<TypeElement> errors, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.error, contents.descriptionLabel);
addClassesSummary(errors, resources.errorSummary, tableHeader, summaryContentTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addAnnotationTypeSummary(SortedSet<TypeElement> annoTypes, Content summaryContentTree) {
TableHeader tableHeader= new TableHeader(contents.annotationType, contents.descriptionLabel);
@ -272,9 +242,6 @@ public class PackageWriterImpl extends HtmlDocletWriter
}
}
/**
* {@inheritDoc}
*/
@Override
public void addPackageDescription(Content packageContentTree) {
if (!utils.getBody(packageElement).isEmpty()) {
@ -285,9 +252,6 @@ public class PackageWriterImpl extends HtmlDocletWriter
}
}
/**
* {@inheritDoc}
*/
@Override
public void addPackageTags(Content packageContentTree) {
Content htmlTree = sectionTree;
@ -295,17 +259,11 @@ public class PackageWriterImpl extends HtmlDocletWriter
packageContentTree.add(sectionTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addPackageContent(Content packageContentTree) {
bodyContents.addMainContent(packageContentTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addPackageFooter() {
Content htmlTree = HtmlTree.FOOTER();
@ -315,9 +273,6 @@ public class PackageWriterImpl extends HtmlDocletWriter
bodyContents.setFooter(htmlTree);
}
/**
* {@inheritDoc}
*/
@Override
public void printDocument(Content contentTree) throws DocFileIOException {
String description = getDescription("declaration", packageElement);
@ -327,9 +282,6 @@ public class PackageWriterImpl extends HtmlDocletWriter
description, localStylesheets, contentTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getPackageSummary(Content summaryContentTree) {
return HtmlTree.SECTION(HtmlStyle.summary, summaryContentTree);

@ -55,9 +55,6 @@ public class PropertyWriterImpl extends AbstractMemberWriter
super(writer, typeElement);
}
/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree) {
memberSummaryTree.add(MarkerComments.START_OF_PROPERTY_SUMMARY);
@ -66,18 +63,12 @@ public class PropertyWriterImpl extends AbstractMemberWriter
return memberTree;
}
/**
* {@inheritDoc}
*/
@Override
public void addMemberTree(Content memberSummaryTree, Content memberTree) {
writer.addMemberTree(HtmlStyle.propertySummary,
SectionName.PROPERTY_SUMMARY, memberSummaryTree, memberTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getPropertyDetailsTreeHeader(Content memberDetailsTree) {
memberDetailsTree.add(MarkerComments.START_OF_PROPERTY_DETAILS);
@ -88,9 +79,6 @@ public class PropertyWriterImpl extends AbstractMemberWriter
return propertyDetailsTree;
}
/**
* {@inheritDoc}
*/
@Override
public Content getPropertyDocTreeHeader(ExecutableElement property) {
Content propertyDocTree = new ContentBuilder();
@ -101,9 +89,6 @@ public class PropertyWriterImpl extends AbstractMemberWriter
.setId(name(property));
}
/**
* {@inheritDoc}
*/
@Override
public Content getSignature(ExecutableElement property) {
return new MemberSignature(property)
@ -111,16 +96,10 @@ public class PropertyWriterImpl extends AbstractMemberWriter
.toContent();
}
/**
* {@inheritDoc}
*/
@Override
public void addDeprecated(ExecutableElement property, Content propertyDocTree) {
}
/**
* {@inheritDoc}
*/
@Override
public void addComments(ExecutableElement property, Content propertyDocTree) {
TypeElement holder = (TypeElement)property.getEnclosingElement();
@ -148,17 +127,11 @@ public class PropertyWriterImpl extends AbstractMemberWriter
}
}
/**
* {@inheritDoc}
*/
@Override
public void addTags(ExecutableElement property, Content propertyDocTree) {
writer.addTagsInfo(property, propertyDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public Content getPropertyDetails(Content propertyDetailsTreeHeader, Content propertyDetailsTree) {
Content propertyDetails = new ContentBuilder(propertyDetailsTreeHeader, propertyDetailsTree);
@ -166,17 +139,11 @@ public class PropertyWriterImpl extends AbstractMemberWriter
.setId(SectionName.PROPERTY_DETAIL.getName()));
}
/**
* {@inheritDoc}
*/
@Override
public Content getPropertyDoc(Content propertyDocTree) {
return getMemberTree(propertyDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@ -184,18 +151,12 @@ public class PropertyWriterImpl extends AbstractMemberWriter
memberTree.add(label);
}
/**
* {@inheritDoc}
*/
@Override
public TableHeader getSummaryTableHeader(Element member) {
return new TableHeader(contents.typeLabel, contents.propertyLabel,
contents.descriptionLabel);
}
/**
* {@inheritDoc}
*/
@Override
protected Table createSummaryTable() {
return new Table(HtmlStyle.memberSummary)
@ -205,9 +166,6 @@ public class PropertyWriterImpl extends AbstractMemberWriter
.setRowScopeColumn(1);
}
/**
* {@inheritDoc}
*/
@Override
public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
Content classLink = writer.getPreQualifiedClassLink(
@ -231,9 +189,6 @@ public class PropertyWriterImpl extends AbstractMemberWriter
inheritedTree.add(labelHeading);
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
Content tdSummary) {
@ -248,9 +203,6 @@ public class PropertyWriterImpl extends AbstractMemberWriter
tdSummary.add(code);
}
/**
* {@inheritDoc}
*/
@Override
protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
String mname = name(member);
@ -260,17 +212,11 @@ public class PropertyWriterImpl extends AbstractMemberWriter
linksTree.add(content);
}
/**
* {@inheritDoc}
*/
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
addModifierAndType(member, utils.getReturnType(typeElement, (ExecutableElement)member), tdSummaryType);
}
/**
* {@inheritDoc}
*/
@Override
protected Content getDeprecatedLink(Element member) {
return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, member,

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020, 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
@ -72,6 +72,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
* @param header the header to write
* @return the body content tree
*/
@Override
public Content getHeader(String header) {
HtmlTree bodyTree = getBody(getWindowTitle(header));
Content headerContent = new ContentBuilder();
@ -92,6 +93,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*
* @return the serialized form summary header tree
*/
@Override
public Content getSerializedSummariesHeader() {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setStyle(HtmlStyle.blockList);
@ -103,6 +105,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*
* @return the package serialized form header tree
*/
@Override
public Content getPackageSerializedHeader() {
return HtmlTree.SECTION(HtmlStyle.serializedPackageContainer);
}
@ -113,6 +116,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
* @param packageName the package header to write
* @return a content tree for the package header
*/
@Override
public Content getPackageHeader(String packageName) {
Content heading = HtmlTree.HEADING(Headings.SerializedForm.PACKAGE_HEADING, true,
contents.packageLabel);
@ -126,6 +130,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*
* @return a content tree for the serialized class header
*/
@Override
public Content getClassSerializedHeader() {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setStyle(HtmlStyle.blockList);
@ -148,6 +153,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
* @param typeElement the class being processed
* @return a content tree for the class header
*/
@Override
public Content getClassHeader(TypeElement typeElement) {
Content classLink = (isVisibleClass(typeElement))
? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, typeElement)
@ -176,6 +182,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*
* @return a content tree for the serial uid info header
*/
@Override
public Content getSerialUIDInfoHeader() {
HtmlTree dl = new HtmlTree(HtmlTag.DL);
dl.setStyle(HtmlStyle.nameValue);
@ -190,6 +197,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
* @param serialUidTree the serial UID content tree to which the serial UID
* content will be added
*/
@Override
public void addSerialUIDInfo(String header, String serialUID,
Content serialUidTree) {
Content headerContent = new StringContent(header);
@ -203,6 +211,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*
* @return a content tree for the class serialize content header
*/
@Override
public Content getClassContentHeader() {
HtmlTree ul = new HtmlTree(HtmlTag.UL);
ul.setStyle(HtmlStyle.blockList);
@ -214,15 +223,14 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*
* @param serializedTreeContent the serialized content tree to be added
*/
@Override
public void addSerializedContent(Content serializedTreeContent) {
HtmlTree divContent = HtmlTree.DIV(HtmlStyle.serializedFormContainer,
serializedTreeContent);
bodyContents.addMainContent(divContent);
}
/**
* {@inheritDoc}
*/
@Override
public void addPackageSerializedTree(Content serializedSummariesTree,
Content packageSerializedTree) {
serializedSummariesTree.add(HtmlTree.LI(HtmlStyle.blockList, packageSerializedTree));
@ -231,6 +239,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
/**
* Add the footer.
*/
@Override
public void addFooter() {
Content htmlTree = HtmlTree.FOOTER();
navBar.setUserFooter(getUserHeaderFooter(false));
@ -239,9 +248,6 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
bodyContents.setFooter(htmlTree);
}
/**
* {@inheritDoc}
*/
@Override
public void printDocument(Content serializedTree) throws DocFileIOException {
serializedTree.add(bodyContents.toContent());
@ -253,6 +259,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*
* @return an instance of a SerialFieldWriter.
*/
@Override
public SerialFieldWriter getSerialFieldWriter(TypeElement typeElement) {
return new HtmlSerialFieldWriter(this, typeElement);
}
@ -262,6 +269,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*
* @return an instance of a SerialMethodWriter.
*/
@Override
public SerialMethodWriter getSerialMethodWriter(TypeElement typeElement) {
return new HtmlSerialMethodWriter(this, typeElement);
}

@ -91,16 +91,12 @@ public class TagletWriterImpl extends TagletWriter {
resources = configuration.getResources();
}
/**
* {@inheritDoc}
*/
@Override
public Content getOutputInstance() {
return new ContentBuilder();
}
/**
* {@inheritDoc}
*/
@Override
protected Content codeTagOutput(Element element, DocTree tag) {
CommentHelper ch = utils.getCommentHelper(element);
StringContent content = new StringContent(utils.normalizeNewlines(ch.getText(tag)));
@ -108,6 +104,7 @@ public class TagletWriterImpl extends TagletWriter {
return result;
}
@Override
protected Content indexTagOutput(Element element, DocTree tag) {
CommentHelper ch = utils.getCommentHelper(element);
IndexTree itt = (IndexTree)tag;
@ -122,9 +119,7 @@ public class TagletWriterImpl extends TagletWriter {
return createAnchorAndSearchIndex(element, tagText, desc, false);
}
/**
* {@inheritDoc}
*/
@Override
public Content getDocRootOutput() {
String path;
if (htmlWriter.pathToRoot.isEmpty())
@ -134,9 +129,7 @@ public class TagletWriterImpl extends TagletWriter {
return new StringContent(path);
}
/**
* {@inheritDoc}
*/
@Override
public Content deprecatedTagOutput(Element element) {
ContentBuilder result = new ContentBuilder();
CommentHelper ch = utils.getCommentHelper(element);
@ -173,27 +166,21 @@ public class TagletWriterImpl extends TagletWriter {
return result;
}
/**
* {@inheritDoc}
*/
@Override
protected Content literalTagOutput(Element element, DocTree tag) {
CommentHelper ch = utils.getCommentHelper(element);
Content result = new StringContent(utils.normalizeNewlines(ch.getText(tag)));
return result;
}
/**
* {@inheritDoc}
*/
@Override
public Content getParamHeader(String header) {
HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.paramLabel,
new StringContent(header)));
return result;
}
/**
* {@inheritDoc}
*/
@Override
@SuppressWarnings("preview")
public Content paramTagOutput(Element element, DocTree paramTag, String paramName) {
ContentBuilder body = new ContentBuilder();
@ -209,9 +196,7 @@ public class TagletWriterImpl extends TagletWriter {
return HtmlTree.DD(body);
}
/**
* {@inheritDoc}
*/
@Override
public Content propertyTagOutput(Element element, DocTree tag, String prefix) {
Content body = new ContentBuilder();
CommentHelper ch = utils.getCommentHelper(element);
@ -223,9 +208,7 @@ public class TagletWriterImpl extends TagletWriter {
return result;
}
/**
* {@inheritDoc}
*/
@Override
public Content returnTagOutput(Element element, DocTree returnTag) {
ContentBuilder result = new ContentBuilder();
CommentHelper ch = utils.getCommentHelper(element);
@ -236,9 +219,7 @@ public class TagletWriterImpl extends TagletWriter {
return result;
}
/**
* {@inheritDoc}
*/
@Override
public Content seeTagOutput(Element holder, List<? extends DocTree> seeTags) {
ContentBuilder body = new ContentBuilder();
for (DocTree dt : seeTags) {
@ -287,9 +268,7 @@ public class TagletWriterImpl extends TagletWriter {
}
}
/**
* {@inheritDoc}
*/
@Override
public Content simpleTagOutput(Element element, List<? extends DocTree> simpleTags, String header) {
CommentHelper ch = utils.getCommentHelper(element);
ContentBuilder result = new ContentBuilder();
@ -308,9 +287,7 @@ public class TagletWriterImpl extends TagletWriter {
return result;
}
/**
* {@inheritDoc}
*/
@Override
public Content simpleTagOutput(Element element, DocTree simpleTag, String header) {
ContentBuilder result = new ContentBuilder();
result.add(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
@ -321,9 +298,7 @@ public class TagletWriterImpl extends TagletWriter {
return result;
}
/**
* {@inheritDoc}
*/
@Override
protected Content systemPropertyTagOutput(Element element, DocTree tag) {
SystemPropertyTree itt = (SystemPropertyTree)tag;
String tagText = itt.getPropertyName().toString();
@ -331,18 +306,14 @@ public class TagletWriterImpl extends TagletWriter {
resources.getText("doclet.System_Property"), true));
}
/**
* {@inheritDoc}
*/
@Override
public Content getThrowsHeader() {
HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.throwsLabel,
new StringContent(resources.getText("doclet.Throws"))));
return result;
}
/**
* {@inheritDoc}
*/
@Override
public Content throwsTagOutput(Element element, DocTree throwsTag, TypeMirror substituteType) {
ContentBuilder body = new ContentBuilder();
CommentHelper ch = utils.getCommentHelper(element);
@ -372,57 +343,43 @@ public class TagletWriterImpl extends TagletWriter {
return result;
}
/**
* {@inheritDoc}
*/
@Override
public Content throwsTagOutput(TypeMirror throwsType) {
HtmlTree result = HtmlTree.DD(HtmlTree.CODE(htmlWriter.getLink(
new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType))));
return result;
}
/**
* {@inheritDoc}
*/
@Override
public Content valueTagOutput(VariableElement field, String constantVal, boolean includeLink) {
return includeLink
? htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field, constantVal, false)
: new StringContent(constantVal);
}
/**
* {@inheritDoc}
*/
@Override
public Content commentTagsToOutput(DocTree holderTag, List<? extends DocTree> tags) {
return commentTagsToOutput(holderTag, null, tags, false);
}
/**
* {@inheritDoc}
*/
@Override
public Content commentTagsToOutput(Element holder, List<? extends DocTree> tags) {
return commentTagsToOutput(null, holder, tags, false);
}
/**
* {@inheritDoc}
*/
@Override
public Content commentTagsToOutput(DocTree holderTag,
Element holder, List<? extends DocTree> tags, boolean isFirstSentence) {
return htmlWriter.commentTagsToContent(holderTag, holder,
tags, isFirstSentence, inSummary);
}
/**
* {@inheritDoc}
*/
@Override
public BaseConfiguration configuration() {
return configuration;
}
/**
* {@inheritDoc}
*/
@Override
protected TypeElement getCurrentPageElement() {
return htmlWriter.getCurrentPageElement();
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -61,48 +61,31 @@ public class WriterFactoryImpl implements WriterFactory {
this.configuration = configuration;
}
/**
* {@inheritDoc}
*/
@Override
public ConstantsSummaryWriter getConstantsSummaryWriter() {
return new ConstantsSummaryWriterImpl(configuration);
}
/**
* {@inheritDoc}
*/
@Override
public PackageSummaryWriter getPackageSummaryWriter(PackageElement packageElement) {
return new PackageWriterImpl(configuration, packageElement);
}
/**
* {@inheritDoc}
*/
@Override
public ModuleSummaryWriter getModuleSummaryWriter(ModuleElement mdle) {
return new ModuleWriterImpl(configuration, mdle);
}
/**
* {@inheritDoc}
*/
@Override
public ClassWriter getClassWriter(TypeElement typeElement, ClassTree classTree) {
return new ClassWriterImpl(configuration, typeElement, classTree);
}
/**
* {@inheritDoc}
*/
@Override
public AnnotationTypeWriter getAnnotationTypeWriter(TypeElement annotationType) {
return new AnnotationTypeWriterImpl(configuration, annotationType);
}
/**
* {@inheritDoc}
*/
@Override
public AnnotationTypeFieldWriter getAnnotationTypeFieldWriter(
AnnotationTypeWriter annotationTypeWriter) {
@ -111,9 +94,6 @@ public class WriterFactoryImpl implements WriterFactory {
(SubWriterHolderWriter) annotationTypeWriter, te);
}
/**
* {@inheritDoc}
*/
@Override
public AnnotationTypeOptionalMemberWriter getAnnotationTypeOptionalMemberWriter(
AnnotationTypeWriter annotationTypeWriter) {
@ -122,9 +102,6 @@ public class WriterFactoryImpl implements WriterFactory {
(SubWriterHolderWriter) annotationTypeWriter, te);
}
/**
* {@inheritDoc}
*/
@Override
public AnnotationTypeRequiredMemberWriter getAnnotationTypeRequiredMemberWriter(
AnnotationTypeWriter annotationTypeWriter) {
@ -133,52 +110,34 @@ public class WriterFactoryImpl implements WriterFactory {
(SubWriterHolderWriter) annotationTypeWriter, te);
}
/**
* {@inheritDoc}
*/
@Override
public EnumConstantWriterImpl getEnumConstantWriter(ClassWriter classWriter) {
return new EnumConstantWriterImpl((SubWriterHolderWriter) classWriter,
classWriter.getTypeElement());
}
/**
* {@inheritDoc}
*/
@Override
public FieldWriterImpl getFieldWriter(ClassWriter classWriter) {
return new FieldWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getTypeElement());
}
/**
* {@inheritDoc}
*/
@Override
public PropertyWriterImpl getPropertyWriter(ClassWriter classWriter) {
return new PropertyWriterImpl((SubWriterHolderWriter) classWriter,
classWriter.getTypeElement());
}
/**
* {@inheritDoc}
*/
@Override
public MethodWriterImpl getMethodWriter(ClassWriter classWriter) {
return new MethodWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getTypeElement());
}
/**
* {@inheritDoc}
*/
@Override
public ConstructorWriterImpl getConstructorWriter(ClassWriter classWriter) {
return new ConstructorWriterImpl((SubWriterHolderWriter) classWriter,
classWriter.getTypeElement());
}
/**
* {@inheritDoc}
*/
@Override
public MemberSummaryWriter getMemberSummaryWriter(ClassWriter classWriter,
VisibleMemberTable.Kind memberType) {
@ -201,9 +160,6 @@ public class WriterFactoryImpl implements WriterFactory {
}
}
/**
* {@inheritDoc}
*/
@Override
public MemberSummaryWriter getMemberSummaryWriter(AnnotationTypeWriter annotationTypeWriter,
VisibleMemberTable.Kind memberType) {
@ -222,17 +178,11 @@ public class WriterFactoryImpl implements WriterFactory {
}
}
/**
* {@inheritDoc}
*/
@Override
public SerializedFormWriter getSerializedFormWriter() {
return new SerializedFormWriterImpl(configuration);
}
/**
* {@inheritDoc}
*/
@Override
public DocFilesHandler getDocFilesHandler(Element element) {
return new DocFilesHandlerImpl(configuration, element);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020, 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
@ -58,6 +58,7 @@ public class Comment extends Content {
* @param content content that needs to be added
* @throws UnsupportedOperationException always
*/
@Override
public void add(Content content) {
throw new UnsupportedOperationException();
}
@ -73,16 +74,11 @@ public class Comment extends Content {
throw new UnsupportedOperationException();
}
/**
* {@inheritDoc}
*/
@Override
public boolean isEmpty() {
return commentText.isEmpty();
}
/**
* {@inheritDoc}
*/
@Override
public boolean write(Writer out, boolean atNewline) throws IOException {
if (!atNewline)

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020, 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
@ -73,9 +73,6 @@ public class FixedStringContent extends Content {
throw new UnsupportedOperationException();
}
/**
* {@inheritDoc}
*/
@Override
public boolean isEmpty() {
return string.isEmpty();
@ -86,17 +83,11 @@ public class FixedStringContent extends Content {
return RawHtml.charCount(string);
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return string;
}
/**
* {@inheritDoc}
*/
@Override
public boolean write(Writer out, boolean atNewline) throws IOException {
out.write(string);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020, 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
@ -186,9 +186,6 @@ public class HtmlTree extends Content {
add(new StringContent(stringContent));
}
/**
* {@inheritDoc}
*/
@Override
public int charCount() {
int n = 0;
@ -877,9 +874,6 @@ public class HtmlTree extends Content {
return htmlTree;
}
/**
* {@inheritDoc}
*/
@Override
public boolean isEmpty() {
return (!hasContent() && !hasAttrs());
@ -957,9 +951,6 @@ public class HtmlTree extends Content {
return (htmlTag.blockType == HtmlTag.BlockType.INLINE);
}
/**
* {@inheritDoc}
*/
@Override
public boolean write(Writer out, boolean atNewline) throws IOException {
if (!isInline() && !atNewline)

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020, 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
@ -58,6 +58,7 @@ public class RawHtml extends Content {
* @param content content that needs to be added
* @throws UnsupportedOperationException always
*/
@Override
public void add(Content content) {
throw new UnsupportedOperationException();
}
@ -73,16 +74,11 @@ public class RawHtml extends Content {
throw new UnsupportedOperationException();
}
/**
* {@inheritDoc}
*/
@Override
public boolean isEmpty() {
return rawHtmlContent.isEmpty();
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return rawHtmlContent;
@ -147,9 +143,6 @@ public class RawHtml extends Content {
return count;
}
/**
* {@inheritDoc}
*/
@Override
public boolean write(Writer out, boolean atNewline) throws IOException {
out.write(rawHtmlContent);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020, 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
@ -82,9 +82,6 @@ public class StringContent extends Content {
Entity.escapeHtmlChars(strContent, stringContent);
}
/**
* {@inheritDoc}
*/
@Override
public boolean isEmpty() {
return (stringContent.length() == 0);
@ -95,17 +92,11 @@ public class StringContent extends Content {
return RawHtml.charCount(stringContent.toString());
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return stringContent.toString();
}
/**
* {@inheritDoc}
*/
@Override
public boolean write(Writer out, boolean atNewline) throws IOException {
String s = stringContent.toString();

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, 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
@ -39,42 +39,52 @@ import java.util.Set;
public interface DocletElement extends Element {
@Override
default TypeMirror asType() {
throw new UnsupportedOperationException("Unsupported method");
}
@Override
default ElementKind getKind() {
return ElementKind.OTHER;
}
@Override
default Set<Modifier> getModifiers() {
throw new UnsupportedOperationException("Unsupported method");
}
@Override
default Name getSimpleName() {
throw new UnsupportedOperationException("Unsupported method");
}
@Override
default Element getEnclosingElement() {
throw new UnsupportedOperationException("Unsupported method");
}
@Override
default java.util.List<? extends Element> getEnclosedElements() {
throw new UnsupportedOperationException("Unsupported method");
}
@Override
default java.util.List<? extends AnnotationMirror> getAnnotationMirrors() {
throw new UnsupportedOperationException("Unsupported method");
}
@Override
default <A extends Annotation> A getAnnotation(Class<A> annotationType) {
throw new UnsupportedOperationException("Unsupported method");
}
@Override
default <R, P> R accept(ElementVisitor<R, P> v, P p) {
return v.visitUnknown(this, p);
}
@Override
default <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) {
throw new UnsupportedOperationException("Unsupported method");
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2020, 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
@ -53,6 +53,7 @@ public class OverviewElement implements DocletElement {
return pkg;
}
@Override
public FileObject getFileObject() {
return fo;
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -84,9 +84,6 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
return new AnnotationTypeBuilder(context, annotationTypeDoc, writer);
}
/**
* {@inheritDoc}
*/
@Override
public void build() throws DocletException {
buildAnnotationTypeDoc();

@ -105,9 +105,6 @@ public class AnnotationTypeFieldBuilder extends AbstractMemberBuilder {
return !members.isEmpty();
}
/**
* {@inheritDoc}
*/
@Override
public void build(Content contentTree) throws DocletException {
buildAnnotationTypeField(contentTree);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -73,9 +73,6 @@ public class AnnotationTypeOptionalMemberBuilder extends AnnotationTypeRequiredM
typeElement, writer);
}
/**
* {@inheritDoc}
*/
@Override
public void build(Content contentTree) throws DocletException {
buildAnnotationTypeOptionalMember(contentTree);
@ -108,9 +105,6 @@ public class AnnotationTypeOptionalMemberBuilder extends AnnotationTypeRequiredM
annotationDocTree);
}
/**
* {@inheritDoc}
*/
@Override
public AnnotationTypeRequiredMemberWriter getWriter() {
return writer;

@ -107,9 +107,6 @@ public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
return !members.isEmpty();
}
/**
* {@inheritDoc}
*/
@Override
public void build(Content contentTree) throws DocletException {
buildAnnotationTypeRequiredMember(contentTree);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -133,9 +133,6 @@ public class ClassBuilder extends AbstractBuilder {
return new ClassBuilder(context, typeElement, writer);
}
/**
* {@inheritDoc}
*/
@Override
public void build() throws DocletException {
buildClassDoc();

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -111,10 +111,6 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
return new ConstantsSummaryBuilder(context, writer);
}
/**
* {@inheritDoc}
* @throws DocletException if there is a problem while building the documentation
*/
@Override
public void build() throws DocletException {
if (writer == null) {

@ -96,9 +96,6 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
return new ConstructorBuilder(context, typeElement, writer);
}
/**
* {@inheritDoc}
*/
@Override
public boolean hasMembersToDocument() {
return !constructors.isEmpty();
@ -113,9 +110,6 @@ public class ConstructorBuilder extends AbstractMemberBuilder {
return writer;
}
/**
* {@inheritDoc}
*/
@Override
public void build(Content contentTree) throws DocletException {
buildConstructorDoc(contentTree);

@ -101,9 +101,6 @@ public class EnumConstantBuilder extends AbstractMemberBuilder {
return !enumConstants.isEmpty();
}
/**
* {@inheritDoc}
*/
@Override
public void build(Content contentTree) throws DocletException {
buildEnumConstant(contentTree);

@ -103,9 +103,6 @@ public class FieldBuilder extends AbstractMemberBuilder {
return !fields.isEmpty();
}
/**
* {@inheritDoc}
*/
@Override
public void build(Content contentTree) throws DocletException {
buildFieldDoc(contentTree);

@ -96,17 +96,11 @@ public class MethodBuilder extends AbstractMemberBuilder {
return new MethodBuilder(context, typeElement, writer);
}
/**
* {@inheritDoc}
*/
@Override
public boolean hasMembersToDocument() {
return !methods.isEmpty();
}
/**
* {@inheritDoc}
*/
@Override
public void build(Content contentTree) throws DocletException {
buildMethodDoc(contentTree);

@ -103,9 +103,6 @@ public class PropertyBuilder extends AbstractMemberBuilder {
return !properties.isEmpty();
}
/**
* {@inheritDoc}
*/
@Override
public void build(Content contentTree) throws DocletException {
buildPropertyDoc(contentTree);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2020, 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
@ -66,6 +66,7 @@ public abstract class BasePropertyTaglet extends BaseTaglet {
* @param tagletWriter the taglet writer for output.
* @return the TagletOutput representation of this <code>Tag</code>.
*/
@Override
public Content getTagletOutput(Element element, DocTree tag, TagletWriter tagletWriter) {
return tagletWriter.propertyTagOutput(element, tag, getText(tagletWriter));
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -73,6 +73,7 @@ public class BaseTaglet implements Taglet {
* @return true if this {@code Taglet} can be used in constructor documentation and false
* otherwise.
*/
@Override
public final boolean inConstructor() {
return sites.contains(Location.CONSTRUCTOR);
}
@ -83,6 +84,7 @@ public class BaseTaglet implements Taglet {
* @return true if this {@code Taglet} can be used in field documentation and false
* otherwise.
*/
@Override
public final boolean inField() {
return sites.contains(Location.FIELD);
}
@ -93,6 +95,7 @@ public class BaseTaglet implements Taglet {
* @return true if this {@code Taglet} can be used in method documentation and false
* otherwise.
*/
@Override
public final boolean inMethod() {
return sites.contains(Location.METHOD);
}
@ -103,6 +106,7 @@ public class BaseTaglet implements Taglet {
* @return true if this {@code Taglet} can be used in method documentation and false
* otherwise.
*/
@Override
public final boolean inOverview() {
return sites.contains(Location.OVERVIEW);
}
@ -113,6 +117,7 @@ public class BaseTaglet implements Taglet {
* @return true if this {@code Taglet} can be used in module documentation and false
* otherwise.
*/
@Override
public final boolean inModule() {
return sites.contains(Location.MODULE);
}
@ -123,6 +128,7 @@ public class BaseTaglet implements Taglet {
* @return true if this {@code Taglet} can be used in package documentation and false
* otherwise.
*/
@Override
public final boolean inPackage() {
return sites.contains(Location.PACKAGE);
}
@ -133,6 +139,7 @@ public class BaseTaglet implements Taglet {
* @return true if this {@code Taglet} can be used in type documentation and false
* otherwise.
*/
@Override
public final boolean inType() {
return sites.contains(Location.TYPE);
}
@ -142,6 +149,7 @@ public class BaseTaglet implements Taglet {
*
* @return true if this {@code Taglet} represents an inline tag and false otherwise.
*/
@Override
public final boolean isInlineTag() {
return inline;
}
@ -160,6 +168,7 @@ public class BaseTaglet implements Taglet {
*
* @return the name of this tag.
*/
@Override
public String getName() {
return name;
}
@ -179,22 +188,12 @@ public class BaseTaglet implements Taglet {
: tree.getKind() == tagKind;
}
/**
* {@inheritDoc}
*
* @throws UnsupportedTagletOperationException thrown when the method is
* not supported by the taglet.
*/
@Override
public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) {
throw new UnsupportedTagletOperationException("Method not supported in taglet " + getName() + ".");
}
/**
* {@inheritDoc}
*
* @throws UnsupportedTagletOperationException thrown when the method is not
* supported by the taglet.
*/
@Override
public Content getTagletOutput(Element holder, TagletWriter writer) {
throw new UnsupportedTagletOperationException("Method not supported in taglet " + getName() + ".");
}

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2020, 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
@ -153,9 +153,7 @@ public class ThrowsTaglet extends BaseTaglet
return result;
}
/**
* {@inheritDoc}
*/
@Override
public Content getTagletOutput(Element holder, TagletWriter writer) {
Utils utils = writer.configuration().utils;
ExecutableElement execHolder = (ExecutableElement) holder;

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
@ -55,55 +55,42 @@ public class UserTaglet implements Taglet {
userTaglet = t;
}
@Override
public Set<jdk.javadoc.doclet.Taglet.Location> getAllowedLocations() {
return userTaglet.getAllowedLocations();
}
/**
* {@inheritDoc}
*/
@Override
public boolean inField() {
return userTaglet.getAllowedLocations().contains(FIELD);
}
/**
* {@inheritDoc}
*/
@Override
public boolean inConstructor() {
return userTaglet.getAllowedLocations().contains(CONSTRUCTOR);
}
/**
* {@inheritDoc}
*/
@Override
public boolean inMethod() {
return userTaglet.getAllowedLocations().contains(METHOD);
}
/**
* {@inheritDoc}
*/
@Override
public boolean inOverview() {
return userTaglet.getAllowedLocations().contains(OVERVIEW);
}
/**
* {@inheritDoc}
*/
@Override
public boolean inModule() {
return userTaglet.getAllowedLocations().contains(MODULE);
}
/**
* {@inheritDoc}
*/
@Override
public boolean inPackage() {
return userTaglet.getAllowedLocations().contains(PACKAGE);
}
/**
* {@inheritDoc}
*/
@Override
public boolean inType() {
return userTaglet.getAllowedLocations().contains(TYPE);
}
@ -113,33 +100,29 @@ public class UserTaglet implements Taglet {
*
* @return true if this <code>Taglet</code> is an inline tag and false otherwise.
*/
@Override
public boolean isInlineTag() {
return userTaglet.isInlineTag();
}
@Override
public boolean isBlockTag() {
return userTaglet.isBlockTag();
}
/**
* {@inheritDoc}
*/
@Override
public String getName() {
return userTaglet.getName();
}
/**
* {@inheritDoc}
*/
@Override
public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer){
Content output = writer.getOutputInstance();
output.add(new RawHtml(userTaglet.toString(Collections.singletonList(tag), element)));
return output;
}
/**
* {@inheritDoc}
*/
@Override
public Content getTagletOutput(Element holder, TagletWriter writer) {
Content output = writer.getOutputInstance();
Utils utils = writer.configuration().utils;

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020, 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
@ -61,13 +61,11 @@ public class DocPath {
path = (p.endsWith("/") ? p.substring(0, p.length() - 1) : p);
}
/** {@inheritDoc} */
@Override
public boolean equals(Object other) {
return (other instanceof DocPath) && path.equals(((DocPath)other).path);
}
/** {@inheritDoc} */
@Override
public int hashCode() {
return path.hashCode();

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020, 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
@ -94,6 +94,7 @@ public class Group {
* comparison.
*/
private static class MapKeyComparator implements Comparator<String> {
@Override
public int compare(String key1, String key2) {
return key2.length() - key1.length();
}

@ -3413,6 +3413,7 @@ public class Utils {
this.second = second;
}
@Override
public String toString() {
StringBuffer out = new StringBuffer();
out.append(first + ":" + second);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2020, 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
@ -37,10 +37,13 @@ import java.util.spi.ToolProvider;
// This is currently a stand-alone top-level class so that it can easily be excluded
// from interims builds of javadoc, used while building JDK.
public class JavadocToolProvider implements ToolProvider {
@Override
public String name() {
return "javadoc";
}
@Override
public int run(PrintWriter out, PrintWriter err, String... args) {
return Main.execute(args, out, err);
}