8284446: Miscellaneous doc-comment fixes in jdk.javadoc

Reviewed-by: jjg
This commit is contained in:
Pavel Rappo 2022-04-07 09:38:42 +00:00
parent 192886546b
commit 4f36229c96
14 changed files with 18 additions and 23 deletions

View File

@ -42,8 +42,6 @@ import jdk.javadoc.internal.doclets.toolkit.util.PreviewAPIListBuilder;
/**
* Generate File to list all the preview elements with the
* appropriate links.
*
* @see java.util.List
*/
public class PreviewListWriter extends SummaryListWriter<PreviewAPIListBuilder> {

View File

@ -78,7 +78,7 @@ public class HtmlTree extends Content {
/**
* The enclosed content ("inner HTML") for this HTML element.
* The items in this list are never null.
* The items in this list are never {@code null}.
*/
private List<Content> content = List.of();
@ -315,7 +315,7 @@ public class HtmlTree extends Content {
* Creates an HTML {@code A} element.
* The {@code ref} argument will be URL-encoded for use as the attribute value.
*
* @param ref the value for the {@code href} attribute}
* @param ref the value for the {@code href} attribute
* @param body the content for element
* @return the element
*/
@ -331,7 +331,7 @@ public class HtmlTree extends Content {
* and will <i>not</i> be additionally URL-encoded, but will be
* {@link URI#toASCIIString() converted} to ASCII for use as the attribute value.
*
* @param ref the value for the {@code href} attribute}
* @param ref the value for the {@code href} attribute
* @param body the content for element
* @return the element
*/
@ -1017,7 +1017,7 @@ public class HtmlTree extends Content {
/**
* Returns true if the element is a normal element that is <em>phrasing content</em>.
*
* @return true if the HTML tag is an inline element
* @return true if this is an inline element
*
* @see <a href="https://www.w3.org/TR/html51/dom.html#kinds-of-content-phrasing-content">Phrasing Content</a>
*/
@ -1083,7 +1083,7 @@ public class HtmlTree extends Content {
/**
* Given a Content node, strips all html characters and
* return the result.
* returns the result.
*
* @param body The content node to check.
* @return the plain text from the content node

View File

@ -34,7 +34,7 @@ import jdk.javadoc.doclet.Taglet.Location;
import jdk.javadoc.internal.doclets.toolkit.Content;
/**
* An inline Taglet used to denote literal code fragments.
* An inline taglet used to denote literal code fragments.
* The enclosed text is interpreted as not containing HTML markup or
* nested javadoc tags, and is rendered in a font suitable for code.
*

View File

@ -33,7 +33,7 @@ import jdk.javadoc.doclet.Taglet.Location;
import jdk.javadoc.internal.doclets.toolkit.Content;
/**
* A taglet that represents the @deprecated tag.
* A taglet that represents the {@code @deprecated} tag.
*/
public class DeprecatedTaglet extends BaseTaglet {

View File

@ -33,7 +33,7 @@ import jdk.javadoc.doclet.Taglet.Location;
import jdk.javadoc.internal.doclets.toolkit.Content;
/**
* An inline Taglet representing {&#064;docRoot}. This taglet is
* An inline taglet representing {@code {@docRoot}}. This taglet is
* used to get the relative path to the document's root output
* directory.
*/

View File

@ -34,7 +34,7 @@ import jdk.javadoc.doclet.Taglet.Location;
import jdk.javadoc.internal.doclets.toolkit.Content;
/**
* An inline Taglet used to index word or a phrase.
* An inline taglet used to index a word or a phrase.
* The enclosed text is interpreted as not containing HTML markup or
* nested javadoc tags.
*/

View File

@ -40,7 +40,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
/**
* An inline Taglet representing the {@code inheritDoc} tag. This tag should only
* An inline taglet representing the {@code {@inheritDoc}} tag. This tag should only
* be used with a method. It is used to inherit documentation from overridden
* and implemented methods.
*/

View File

@ -34,7 +34,7 @@ import jdk.javadoc.doclet.Taglet.Location;
import jdk.javadoc.internal.doclets.toolkit.Content;
/**
* An inline Taglet used to denote literal text.
* An inline taglet used to denote literal text.
* For example, the text:
* <blockquote> {@code {@literal a<B>c}} </blockquote>
* displays as:

View File

@ -40,7 +40,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
/**
* A taglet that represents the @see tag.
* A taglet that represents the {@code @see} tag.
*/
public class SeeTaglet extends BaseTaglet implements InheritableTaglet {

View File

@ -34,7 +34,7 @@ import com.sun.source.doctree.SummaryTree;
import jdk.javadoc.internal.doclets.toolkit.Content;
/**
* A taglet that represents the @summary tag.
* A taglet that represents the {@code {@summary}} tag.
*/
public class SummaryTaglet extends BaseTaglet {

View File

@ -33,7 +33,7 @@ import jdk.javadoc.doclet.Taglet.Location;
import jdk.javadoc.internal.doclets.toolkit.Content;
/**
* This is the Taglet interface used internally within the doclet.
* This is the taglet interface used internally within the doclet.
*/
public interface Taglet {
/**

View File

@ -53,7 +53,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
/**
* A taglet that represents the @throws tag.
* A taglet that represents the {@code @throws} tag.
*/
public class ThrowsTaglet extends BaseTaglet
implements InheritableTaglet {

View File

@ -38,7 +38,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
/**
* An inline Taglet representing the value tag. This tag should only be used with
* An inline taglet representing the value tag. This tag should only be used with
* constant fields that have a value. It is used to access the value of constant
* fields. This inline tag has an optional field name parameter. If the name is
* specified, the constant value is retrieved from the specified field. A link

View File

@ -49,9 +49,6 @@ import jdk.javadoc.internal.doclets.toolkit.Messages;
/**
* Build Class Hierarchy for all the Classes. This class builds the Class
* Tree and the Interface Tree separately.
*
* @see java.util.HashMap
* @see java.util.List
*/
public class ClassTree {
@ -250,7 +247,7 @@ public class ClassTree {
* @param map the entire map.
* @param superclass java.lang.Object or the super-interface.
* @param typeElement sub-interface to be mapped.
* @returns boolean true if class added, false if class already processed.
* @return true if class added, false if class already processed.
*/
private boolean add(Map<TypeElement, SortedSet<TypeElement>> map, TypeElement superclass, TypeElement typeElement) {
SortedSet<TypeElement> sset = map.computeIfAbsent(superclass, s -> new TreeSet<>(comparator));
@ -268,7 +265,7 @@ public class ClassTree {
*
* @param map The entire map.
* @param typeElement class for which the sub-class set is requested.
* @returns a list of sub classes.
* @return a set of sub classes.
*/
private SortedSet<TypeElement> get(Map<TypeElement, SortedSet<TypeElement>> map, TypeElement typeElement) {
return map.computeIfAbsent(typeElement, t -> new TreeSet<>(comparator));