Skip to content
Permalink
Browse files
8238467: Clean up annotations on overridden/implemented methods
Reviewed-by: jjg
  • Loading branch information
pavelrappo committed Feb 4, 2020
1 parent 9d7777e commit 029f5477002e26295625f31eb1e8b2617d10ffe1
Showing with 175 additions and 948 deletions.
  1. +3 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java
  2. +2 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTool.java
  3. +1 −4 ...vadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java
  4. +17 −58 ...avadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeFieldWriterImpl.java
  5. +1 −19 ...are/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
  6. +18 −61 ...are/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
  7. +0 −36 ...jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java
  8. +0 −60 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java
  9. +1 −37 ...k.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java
  10. +1 −43 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java
  11. +2 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java
  12. +1 −55 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java
  13. +0 −51 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java
  14. +0 −9 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlConfiguration.java
  15. +0 −9 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java
  16. +8 −0 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java
  17. +9 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java
  18. +1 −10 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkFactoryImpl.java
  19. +1 −9 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkInfoImpl.java
  20. +4 −10 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkOutputImpl.java
  21. +0 −45 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java
  22. +0 −23 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java
  23. +0 −27 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java
  24. +1 −49 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java
  25. +0 −54 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java
  26. +15 −7 ...jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java
  27. +23 −66 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java
  28. +2 −52 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactoryImpl.java
  29. +3 −7 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Comment.java
  30. +1 −10 ...dk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/FixedStringContent.java
  31. +1 −10 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
  32. +3 −10 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/RawHtml.java
  33. +1 −10 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/StringContent.java
  34. +11 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/DocletElement.java
  35. +2 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/OverviewElement.java
  36. +1 −4 ...dk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java
  37. +0 −3 ...vadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeFieldBuilder.java
  38. +1 −7 ...re/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java
  39. +0 −3 ...re/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
  40. +1 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java
  41. +1 −5 ....javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java
  42. +0 −6 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstructorBuilder.java
  43. +0 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java
  44. +0 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/FieldBuilder.java
  45. +0 −6 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MethodBuilder.java
  46. +0 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java
  47. +2 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BasePropertyTaglet.java
  48. +12 −13 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BaseTaglet.java
  49. +2 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ThrowsTaglet.java
  50. +14 −31 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java
  51. +1 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPath.java
  52. +2 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Group.java
  53. +1 −0 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
  54. +4 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocToolProvider.java
@@ -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 JavadocTaskImpl(Context context, Class<?> docletClass,
setLocale(Locale.getDefault());
}

@Override
public void setLocale(Locale locale) {
if (used.get())
throw new IllegalStateException();
@@ -88,6 +89,7 @@ public void addModules(Iterable<String> moduleNames) {
}
}

@Override
public Boolean call() {
if (!used.getAndSet(true)) {
initContext();
@@ -62,7 +62,8 @@
* 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 @@ protected Content getTypeParameters(ExecutableElement member) {
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 AnnotationTypeFieldWriterImpl(SubWriterHolderWriter writer,
super(writer, annotationType);
}

/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement,
Content memberSummaryTree) {
memberSummaryTree.add(
@@ -74,31 +72,23 @@ public Content getMemberSummaryHeader(TypeElement typeElement,
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 Content getAnnotationDetailsTreeHeader() {
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 Content getAnnotationDocTreeHeader(Element member) {
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 Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content
.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 @@ protected Table createSummaryTable() {
.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 @@ protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement
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 AnnotationTypeOptionalMemberWriterImpl(SubWriterHolderWriter writer,
super(writer, annotationType);
}

/**
* {@inheritDoc}
*/
@Override
public Content getMemberSummaryHeader(TypeElement typeElement,
Content memberSummaryTree) {
@@ -76,18 +73,12 @@ public Content getMemberSummaryHeader(TypeElement typeElement,
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,27 +94,18 @@ public void addDefaultValueInfo(Element member, Content annotationDocTree) {
}
}

/**
* {@inheritDoc}
*/
@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
contents.annotateTypeOptionalMemberSummaryLabel);
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,
Loading

0 comments on commit 029f547

Please sign in to comment.