8251550: Clean up jdk.javadoc and the related parts of jdk.compiler
Reviewed-by: jjg
This commit is contained in:
parent
61e42ed85d
commit
cc8d52020d
src
jdk.compiler/share/classes/com/sun
source
doctree
AttributeTree.javaAuthorTree.javaCommentTree.javaDeprecatedTree.javaDocCommentTree.javaDocRootTree.javaDocTree.javaDocTreeVisitor.javaDocTypeTree.javaEndElementTree.javaEntityTree.javaErroneousTree.javaHiddenTree.javaIdentifierTree.javaIndexTree.javaInheritDocTree.javaLinkTree.javaLiteralTree.javaParamTree.javaProvidesTree.javaReferenceTree.javaReturnTree.javaSeeTree.javaSerialDataTree.javaSerialFieldTree.javaSerialTree.javaSinceTree.javaStartElementTree.javaSummaryTree.javaSystemPropertyTree.javaThrowsTree.javaUnknownBlockTagTree.javaUnknownInlineTagTree.javaUsesTree.javaValueTree.javaVersionTree.java
tree
util
tools/javac
jdk.javadoc/share/classes/jdk/javadoc/internal
doclets
formats/html
toolkit
tool
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -56,13 +56,14 @@ public interface AttributeTree extends DocTree {
|
||||
|
||||
/**
|
||||
* Returns the kind of the attribute.
|
||||
* @return the kind of the attribute.
|
||||
* @return the kind of the attribute
|
||||
*/
|
||||
ValueKind getValueKind();
|
||||
|
||||
/**
|
||||
* Returns the value of the attribute, or {@code null} if the kind is EMPTY.
|
||||
* @return the value of the attribute.
|
||||
* Returns the value of the attribute, or {@code null} if the
|
||||
* {@linkplain #getValueKind() kind of this attribute} is {@code EMPTY}.
|
||||
* @return the value of the attribute
|
||||
*/
|
||||
List<? extends DocTree> getValue();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,10 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @author block tag.
|
||||
* A tree node for an {@code @author} block tag.
|
||||
*
|
||||
* <p>
|
||||
* @author name-text.
|
||||
* <pre>
|
||||
* @author name-text
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,8 +28,9 @@ package com.sun.source.doctree;
|
||||
/**
|
||||
* An embedded HTML comment.
|
||||
*
|
||||
* <p>
|
||||
* {@literal <!-- text --> }
|
||||
* <pre>
|
||||
* <!-- text -->
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,10 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @deprecated block tag.
|
||||
* A tree node for an {@code @deprecated} block tag.
|
||||
*
|
||||
* <p>
|
||||
* @deprecated deprecated text.
|
||||
* <pre>
|
||||
* @deprecated deprecated text
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -30,10 +30,11 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The top level representation of a documentation comment.
|
||||
* The top-level representation of a documentation comment.
|
||||
*
|
||||
* <p>
|
||||
* first-sentence body block-tags
|
||||
* <pre>
|
||||
* first-sentence body block-tags
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -26,10 +26,11 @@
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node for an @docroot inline tag.
|
||||
* A tree node for an {@code @docroot} inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@docroot}
|
||||
* <pre>
|
||||
* {@docroot}
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -43,13 +43,13 @@ public interface DocTree {
|
||||
|
||||
/**
|
||||
* Used for instances of {@link AuthorTree}
|
||||
* representing an @author tag.
|
||||
* representing an {@code @author} tag.
|
||||
*/
|
||||
AUTHOR("author"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree}
|
||||
* representing an @code tag.
|
||||
* representing an {@code @code} tag.
|
||||
*/
|
||||
CODE("code"),
|
||||
|
||||
@ -61,7 +61,7 @@ public interface DocTree {
|
||||
|
||||
/**
|
||||
* Used for instances of {@link DeprecatedTree}
|
||||
* representing an @deprecated tag.
|
||||
* representing an {@code @deprecated} tag.
|
||||
*/
|
||||
DEPRECATED("deprecated"),
|
||||
|
||||
@ -73,7 +73,7 @@ public interface DocTree {
|
||||
|
||||
/**
|
||||
* Used for instances of {@link DocRootTree}
|
||||
* representing an @docRoot tag.
|
||||
* representing an {@code @docRoot} tag.
|
||||
*/
|
||||
DOC_ROOT("docRoot"),
|
||||
|
||||
@ -103,13 +103,13 @@ public interface DocTree {
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ThrowsTree}
|
||||
* representing an @exception tag.
|
||||
* representing an {@code @exception} tag.
|
||||
*/
|
||||
EXCEPTION("exception"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link HiddenTree}
|
||||
* representing an @hidden tag.
|
||||
* representing an {@code @hidden} tag.
|
||||
*/
|
||||
HIDDEN("hidden"),
|
||||
|
||||
@ -121,86 +121,86 @@ public interface DocTree {
|
||||
|
||||
/**
|
||||
* Used for instances of {@link IndexTree}
|
||||
* representing a search term.
|
||||
* representing an {@code @index} tag.
|
||||
*/
|
||||
INDEX("index"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link InheritDocTree}
|
||||
* representing an @inheritDoc tag.
|
||||
* representing an {@code @inheritDoc} tag.
|
||||
*/
|
||||
INHERIT_DOC("inheritDoc"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LinkTree}
|
||||
* representing an @link tag.
|
||||
* representing an {@code @link} tag.
|
||||
*/
|
||||
LINK("link"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LinkTree}
|
||||
* representing an @linkplain tag.
|
||||
* representing an {@code @linkplain} tag.
|
||||
*/
|
||||
LINK_PLAIN("linkplain"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link LiteralTree}
|
||||
* representing an @literal tag.
|
||||
* representing an {@code @literal} tag.
|
||||
*/
|
||||
LITERAL("literal"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ParamTree}
|
||||
* representing an @param tag.
|
||||
* representing an {@code @param} tag.
|
||||
*/
|
||||
PARAM("param"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ProvidesTree}
|
||||
* representing an @provides tag.
|
||||
* representing an {@code @provides} tag.
|
||||
*/
|
||||
PROVIDES("provides"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ReferenceTree}
|
||||
* representing a reference to a element in the
|
||||
* representing a reference to an element in the
|
||||
* Java programming language.
|
||||
*/
|
||||
REFERENCE,
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ReturnTree}
|
||||
* representing an @return tag.
|
||||
* representing an {@code @return} tag.
|
||||
*/
|
||||
RETURN("return"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SeeTree}
|
||||
* representing an @see tag.
|
||||
* representing an {@code @see} tag.
|
||||
*/
|
||||
SEE("see"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SerialTree}
|
||||
* representing an @serial tag.
|
||||
* representing an {@code @serial} tag.
|
||||
*/
|
||||
SERIAL("serial"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SerialDataTree}
|
||||
* representing an @serialData tag.
|
||||
* representing an {@code @serialData} tag.
|
||||
*/
|
||||
SERIAL_DATA("serialData"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SerialFieldTree}
|
||||
* representing an @serialField tag.
|
||||
* representing an {@code @serialField} tag.
|
||||
*/
|
||||
SERIAL_FIELD("serialField"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SinceTree}
|
||||
* representing an @since tag.
|
||||
* representing an {@code @since} tag.
|
||||
*/
|
||||
SINCE("since"),
|
||||
|
||||
@ -212,13 +212,13 @@ public interface DocTree {
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SystemPropertyTree}
|
||||
* representing an @systemProperty tag.
|
||||
* representing an {@code @systemProperty} tag.
|
||||
*/
|
||||
SYSTEM_PROPERTY("systemProperty"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link SummaryTree}
|
||||
* representing the summary of a comment description.
|
||||
* representing an {@code @summary} tag.
|
||||
*/
|
||||
SUMMARY("summary"),
|
||||
|
||||
@ -230,7 +230,7 @@ public interface DocTree {
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ThrowsTree}
|
||||
* representing an @throws tag.
|
||||
* representing an {@code @throws} tag.
|
||||
*/
|
||||
THROWS("throws"),
|
||||
|
||||
@ -248,19 +248,19 @@ public interface DocTree {
|
||||
|
||||
/**
|
||||
* Used for instances of {@link UsesTree}
|
||||
* representing an @uses tag.
|
||||
* representing an {@code @uses} tag.
|
||||
*/
|
||||
USES("uses"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link ValueTree}
|
||||
* representing an @value tag.
|
||||
* representing an {@code @value} tag.
|
||||
*/
|
||||
VALUE("value"),
|
||||
|
||||
/**
|
||||
* Used for instances of {@link VersionTree}
|
||||
* representing an @version tag.
|
||||
* representing an {@code @version} tag.
|
||||
*/
|
||||
VERSION("version"),
|
||||
|
||||
@ -287,7 +287,7 @@ public interface DocTree {
|
||||
/**
|
||||
* Returns the kind of this tree.
|
||||
*
|
||||
* @return the kind of this tree.
|
||||
* @return the kind of this tree
|
||||
*/
|
||||
Kind getKind();
|
||||
|
||||
@ -295,8 +295,8 @@ public interface DocTree {
|
||||
* Accept method used to implement the visitor pattern. The
|
||||
* visitor pattern is used to implement operations on trees.
|
||||
*
|
||||
* @param <R> result type of this operation.
|
||||
* @param <D> type of additional data.
|
||||
* @param <R> the result type of this operation
|
||||
* @param <D> the type of additional data
|
||||
* @param visitor the visitor to be called
|
||||
* @param data a parameter value to be passed to the visitor method
|
||||
* @return the value returned from the visitor method
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -30,7 +30,7 @@ package com.sun.source.doctree;
|
||||
* A visitor of trees, in the style of the visitor design pattern.
|
||||
* Classes implementing this interface are used to operate
|
||||
* on a tree when the kind of tree is unknown at compile time.
|
||||
* When a visitor is passed to an tree's {@link DocTree#accept
|
||||
* When a visitor is passed to a tree's {@link DocTree#accept
|
||||
* accept} method, the <code>visit<i>Xyz</i></code> method most applicable
|
||||
* to that tree is invoked.
|
||||
*
|
||||
@ -107,11 +107,11 @@ public interface DocTreeVisitor<R,P> {
|
||||
/**
|
||||
* Visits a DocTypeTree node.
|
||||
*
|
||||
* @implSpec Visits a {@code DocTypeTree} node
|
||||
* @implSpec Visits the provided {@code DocTypeTree} node
|
||||
* by calling {@code visitOther(node, p)}.
|
||||
*
|
||||
* @param node the node being visited
|
||||
* @param p a parameter value
|
||||
* @param p a parameter value
|
||||
* @return a result value
|
||||
* @since 10
|
||||
*/
|
||||
@ -146,7 +146,7 @@ public interface DocTreeVisitor<R,P> {
|
||||
/**
|
||||
* Visits a HiddenTree node.
|
||||
*
|
||||
* @implSpec Visits a {@code HiddenTree} node
|
||||
* @implSpec Visits the provided {@code HiddenTree} node
|
||||
* by calling {@code visitOther(node, p)}.
|
||||
*
|
||||
* @param node the node being visited
|
||||
@ -170,7 +170,7 @@ public interface DocTreeVisitor<R,P> {
|
||||
/**
|
||||
* Visits an IndexTree node.
|
||||
*
|
||||
* @implSpec Visits an {@code IndexTree} node
|
||||
* @implSpec Visits the provided {@code IndexTree} node
|
||||
* by calling {@code visitOther(node, p)}.
|
||||
*
|
||||
* @param node the node being visited
|
||||
@ -218,7 +218,7 @@ public interface DocTreeVisitor<R,P> {
|
||||
/**
|
||||
* Visits a ProvidesTree node.
|
||||
*
|
||||
* @implSpec Visits a {@code ProvidesTree} node
|
||||
* @implSpec Visits the provided {@code ProvidesTree} node
|
||||
* by calling {@code visitOther(node, p)}.
|
||||
*
|
||||
* @param node the node being visited
|
||||
@ -298,7 +298,7 @@ public interface DocTreeVisitor<R,P> {
|
||||
/**
|
||||
* Visits a SummaryTree node.
|
||||
*
|
||||
* @implSpec Visits a {@code SummaryTree} node
|
||||
* @implSpec Visits the provided {@code SummaryTree} node
|
||||
* by calling {@code visitOther(node, p)}.
|
||||
*
|
||||
* @param node the node being visited
|
||||
@ -313,7 +313,7 @@ public interface DocTreeVisitor<R,P> {
|
||||
/**
|
||||
* Visits a SystemPropertyTree node.
|
||||
*
|
||||
* @implSpec Visits a {@code SystemPropertyTree} node
|
||||
* @implSpec Visits the provided {@code SystemPropertyTree} node
|
||||
* by calling {@code visitOther(node, p)}.
|
||||
*
|
||||
* @param node the node being visited
|
||||
@ -382,7 +382,7 @@ public interface DocTreeVisitor<R,P> {
|
||||
R visitValue(ValueTree node, P p);
|
||||
|
||||
/**
|
||||
* Visits a VersionTreeTree node.
|
||||
* Visits a VersionTree node.
|
||||
* @param node the node being visited
|
||||
* @param p a parameter value
|
||||
* @return a result value
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 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
|
||||
@ -28,8 +28,11 @@ package com.sun.source.doctree;
|
||||
/**
|
||||
* A tree node for a {@code doctype} declaration.
|
||||
*
|
||||
* <p>
|
||||
* <!doctype text>
|
||||
* <pre>
|
||||
* <!doctype text>
|
||||
* </pre>
|
||||
*
|
||||
* For HTML5 documents, the correct form is {@code <!doctype html>}.
|
||||
*
|
||||
* @since 10
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -30,8 +30,9 @@ import javax.lang.model.element.Name;
|
||||
/**
|
||||
* A tree node for the end of an HTML element.
|
||||
*
|
||||
* <p>
|
||||
* </ name >
|
||||
* <pre>
|
||||
* </ name >
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -27,14 +27,14 @@ package com.sun.source.doctree;
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
|
||||
/**
|
||||
* A tree node for an HTML entity.
|
||||
*
|
||||
* <p>
|
||||
* & name ; <br>
|
||||
* & # digits ; <br>
|
||||
* & #X hex-digits ;
|
||||
* <pre>
|
||||
* &name;
|
||||
* &#digits;
|
||||
* &#Xhex-digits;
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -29,7 +29,7 @@ import javax.tools.Diagnostic;
|
||||
import javax.tools.JavaFileObject;
|
||||
|
||||
/**
|
||||
* A tree node to stand in for a malformed text
|
||||
* A tree node to stand in for malformed text.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -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
|
||||
@ -28,11 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an {@code @hidden} block tag.
|
||||
*
|
||||
* A tree node for an @hidden block tag.
|
||||
*
|
||||
* <p>
|
||||
* @hidden
|
||||
* <pre>
|
||||
* @hidden
|
||||
* </pre>
|
||||
*
|
||||
* @since 9
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -30,8 +30,9 @@ import javax.lang.model.element.Name;
|
||||
/**
|
||||
* An identifier in a documentation comment.
|
||||
*
|
||||
* <p>
|
||||
* name
|
||||
* <pre>
|
||||
* name
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 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
|
||||
@ -28,10 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @index or @index inline tag.
|
||||
* A tree node for an {@code @index} inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@index keyword optional description} <br>
|
||||
* <pre>
|
||||
* {@index keyword optional description}
|
||||
* </pre>
|
||||
*
|
||||
* @since 9
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -26,11 +26,11 @@
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node for an {@code @inheritDoc} inline tag.
|
||||
*
|
||||
* A tree node for an @inheritDoc inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@inheritDoc}
|
||||
* <pre>
|
||||
* {@inheritDoc}
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,17 +28,18 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @link or @linkplain inline tag.
|
||||
* A tree node for an {@code @link} or {@code @linkplain} inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@link reference label} <br>
|
||||
* {@linkplain reference label }
|
||||
* <pre>
|
||||
* {@link reference label}
|
||||
* {@linkplain reference label}
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
public interface LinkTree extends InlineTagTree {
|
||||
/**
|
||||
* Returns the reference of a link.
|
||||
* Returns the reference of the link.
|
||||
* @return the reference
|
||||
*/
|
||||
ReferenceTree getReference();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -26,17 +26,18 @@
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node for an {@code @literal} or {@code @code} inline tag.
|
||||
*
|
||||
* A tree node for an @literal or @code inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@literal text}
|
||||
* <pre>
|
||||
* {@literal text}
|
||||
* {@code text}
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
public interface LiteralTree extends InlineTagTree {
|
||||
/**
|
||||
* Returns the body of the {@code @code} or {@code @literal} tag.
|
||||
* Returns the body of the {@code @literal} or {@code @code} tag.
|
||||
* @return the body of the tag
|
||||
*/
|
||||
TextTree getBody();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,17 +28,18 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @param block tag.
|
||||
* A tree node for an {@code @param} block tag.
|
||||
*
|
||||
* <p>
|
||||
* @param parameter-name description
|
||||
* <pre>
|
||||
* @param parameter-name description
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
public interface ParamTree extends BlockTagTree {
|
||||
/**
|
||||
* Returns true if this is documenting a type parameter.
|
||||
* @return true if this is documenting a type parameter
|
||||
* Returns {@code true} if this is documenting a type parameter.
|
||||
* @return {@code true} if this is documenting a type parameter
|
||||
*/
|
||||
boolean isTypeParameter();
|
||||
|
||||
|
@ -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
|
||||
@ -28,11 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for a {@code @provides} block tag.
|
||||
*
|
||||
* A tree node for a @provides block tag.
|
||||
*
|
||||
* <p>
|
||||
* @provides service-type description
|
||||
* <pre>
|
||||
* @provides service-type description
|
||||
* </pre>
|
||||
*
|
||||
* @since 9
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,9 +28,10 @@ package com.sun.source.doctree;
|
||||
/**
|
||||
* A tree node for a reference to a Java language element.
|
||||
*
|
||||
* <p>
|
||||
* package.class#field
|
||||
* package.class#method(<i>arg-types</i>)
|
||||
* <pre>
|
||||
* package.class#field
|
||||
* package.class#method(<i>arg-types</i>)
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@ -38,7 +39,7 @@ public interface ReferenceTree extends DocTree {
|
||||
/**
|
||||
* Returns the signature of the Java language element being referenced,
|
||||
* as found in {@code @see} and similar nodes.
|
||||
* @return the signature.
|
||||
* @return the signature
|
||||
*/
|
||||
String getSignature();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,10 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @return block tag.
|
||||
* A tree node for an {@code @return} block tag.
|
||||
*
|
||||
* <p>
|
||||
* @return description
|
||||
* <pre>
|
||||
* @return description
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,13 +28,13 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an {@code @see} block tag.
|
||||
*
|
||||
* A tree node for an @see block tag.
|
||||
*
|
||||
* <p>
|
||||
* @see "string" <br>
|
||||
* @see <a href="URL#value"> label </a> <br>
|
||||
* @see reference
|
||||
* <pre>
|
||||
* @see "string"
|
||||
* @see <a href="URL#value"> label </a>
|
||||
* @see reference
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,10 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @serialData block tag.
|
||||
* A tree node for an {@code @serialData} block tag.
|
||||
*
|
||||
* <p>
|
||||
* @serialData data-description
|
||||
* <pre>
|
||||
* @serialData data-description
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,10 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @serialData block tag.
|
||||
* A tree node for an {@code @serialField} block tag.
|
||||
*
|
||||
* <p>
|
||||
* @serialField field-name field-type field-description
|
||||
* <pre>
|
||||
* @serialField field-name field-type field-description
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,10 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @serial block tag.
|
||||
* A tree node for an {@code @serial} block tag.
|
||||
*
|
||||
* <p>
|
||||
* @serial field-description | include | exclude
|
||||
* <pre>
|
||||
* @serial field-description | include | exclude
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,10 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @since block tag.
|
||||
* A tree node for an {@code @since} block tag.
|
||||
*
|
||||
* <p>
|
||||
* @since since-text
|
||||
* <pre>
|
||||
* @since since-text
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -31,8 +31,9 @@ import javax.lang.model.element.Name;
|
||||
/**
|
||||
* A tree node for the start of an HTML element.
|
||||
*
|
||||
* <p>
|
||||
* < name [attributes] [/]>
|
||||
* <pre>
|
||||
* < name [attributes] [/]>
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@ -50,9 +51,9 @@ public interface StartElementTree extends DocTree {
|
||||
List<? extends DocTree> getAttributes();
|
||||
|
||||
/**
|
||||
* Returns true if this is a self-closing element,
|
||||
* as indicated by a "/" before the closing ">".
|
||||
* @return true if this is a self-closing element
|
||||
* Returns {@code true} if this is a self-closing element,
|
||||
* as indicated by a {@code "/"} before the closing {@code ">"}.
|
||||
* @return {@code true} if this is a self-closing element
|
||||
*/
|
||||
boolean isSelfClosing();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 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
|
||||
@ -28,10 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an @summary inline tag.
|
||||
* A tree node for an {@code @summary} inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@summary text}
|
||||
* <pre>
|
||||
* {@summary text}
|
||||
* </pre>
|
||||
*
|
||||
* @since 10
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 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
|
||||
@ -25,14 +25,14 @@
|
||||
|
||||
package com.sun.source.doctree;
|
||||
|
||||
|
||||
import javax.lang.model.element.Name;
|
||||
|
||||
/**
|
||||
* A tree node for an {@code @systemProperty} inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@systemProperty property-name}
|
||||
* <pre>
|
||||
* {@systemProperty property-name}
|
||||
* </pre>
|
||||
*
|
||||
* @since 12
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,13 +28,13 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an {@code @exception} or {@code @throws} block tag.
|
||||
* {@code @exception} is a synonym for {@code @throws}.
|
||||
*
|
||||
* A tree node for an @exception or @throws block tag.
|
||||
* @exception is a synonym for @throws.
|
||||
*
|
||||
* <p>
|
||||
* @exception class-name description <br>
|
||||
* @throws class-name description
|
||||
* <pre>
|
||||
* @exception class-name description
|
||||
* @throws class-name description
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,13 +28,13 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an unrecognized inline tag.
|
||||
* A tree node for an unrecognized block tag.
|
||||
*
|
||||
* <p>
|
||||
* @name content
|
||||
* <pre>
|
||||
* @name content
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*
|
||||
*/
|
||||
public interface UnknownBlockTagTree extends BlockTagTree {
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -30,11 +30,11 @@ import java.util.List;
|
||||
/**
|
||||
* A tree node for an unrecognized inline tag.
|
||||
*
|
||||
* <p>
|
||||
* {@name content}
|
||||
* <pre>
|
||||
* {@name content}
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*
|
||||
*/
|
||||
public interface UnknownInlineTagTree extends InlineTagTree {
|
||||
/**
|
||||
|
@ -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
|
||||
@ -28,11 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an {@code @uses} block tag.
|
||||
*
|
||||
* A tree node for an @uses block tag.
|
||||
*
|
||||
* <p>
|
||||
* @uses service-type description
|
||||
* <pre>
|
||||
* @uses service-type description
|
||||
* </pre>
|
||||
*
|
||||
* @since 9
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -26,10 +26,11 @@
|
||||
package com.sun.source.doctree;
|
||||
|
||||
/**
|
||||
* A tree node for an @value inline tag.
|
||||
* A tree node for an {@code @value} inline tag.
|
||||
*
|
||||
* <p>
|
||||
* { @value reference }
|
||||
* <pre>
|
||||
* {@value reference}
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -28,11 +28,11 @@ package com.sun.source.doctree;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A tree node for an {@code @version} block tag.
|
||||
*
|
||||
* A tree node for an @version block tag.
|
||||
*
|
||||
* <p>
|
||||
* @version version-text
|
||||
* <pre>
|
||||
* @version version-text
|
||||
* </pre>
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -26,7 +26,7 @@
|
||||
package com.sun.source.tree;
|
||||
|
||||
/**
|
||||
* A tree node for the conditional operator ? :.
|
||||
* A tree node for the conditional operator {@code ? :}.
|
||||
*
|
||||
* For example:
|
||||
* <pre>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -76,7 +76,7 @@ public interface InstanceOfTree extends ExpressionTree {
|
||||
* </pre>
|
||||
* returns null.
|
||||
*
|
||||
* @return the tested pattern, or null if this instanceof does not use a pattern.
|
||||
* @return the tested pattern, or null if this instanceof does not use a pattern
|
||||
* @since 14
|
||||
*/
|
||||
PatternTree getPattern();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -46,7 +46,7 @@ import javax.lang.model.element.Name;
|
||||
public interface MemberSelectTree extends ExpressionTree {
|
||||
/**
|
||||
* Returns the expression for which a member is to be selected.
|
||||
* @return the expression.
|
||||
* @return the expression
|
||||
*/
|
||||
ExpressionTree getExpression();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -708,7 +708,7 @@ public interface Tree {
|
||||
/**
|
||||
* Returns the kind of this tree.
|
||||
*
|
||||
* @return the kind of this tree.
|
||||
* @return the kind of this tree
|
||||
*/
|
||||
Kind getKind();
|
||||
|
||||
@ -716,8 +716,8 @@ public interface Tree {
|
||||
* Accept method used to implement the visitor pattern. The
|
||||
* visitor pattern is used to implement operations on trees.
|
||||
*
|
||||
* @param <R> result type of this operation.
|
||||
* @param <D> type of additional data.
|
||||
* @param <R> the result type of this operation
|
||||
* @param <D> the type of additional data
|
||||
* @param visitor the visitor to be called
|
||||
* @param data a value to be passed to the visitor
|
||||
* @return the result returned from calling the visitor
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2014, 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
|
||||
@ -41,7 +41,7 @@ public interface DocSourcePositions extends SourcePositions {
|
||||
/**
|
||||
* Returns the starting position of the tree within the comment within the file. If tree is not found within
|
||||
* file, or if the starting position is not available,
|
||||
* return {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* returns {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* The given tree should be under the given comment tree, and the given documentation
|
||||
* comment tree should be returned from a {@link DocTrees#getDocCommentTree(com.sun.source.util.TreePath) }
|
||||
* for a tree under the given file.
|
||||
@ -54,18 +54,18 @@ public interface DocSourcePositions extends SourcePositions {
|
||||
* {@code subtree.getStartPosition() == NOPOS}
|
||||
* </p>
|
||||
*
|
||||
* @param file CompilationUnit in which to find tree.
|
||||
* @param file compilation unit in which to find tree
|
||||
* @param comment the comment tree that encloses the tree for which the
|
||||
* position is being sought
|
||||
* @param tree tree for which a position is sought.
|
||||
* @return the start position of tree.
|
||||
* @param tree tree for which a position is sought
|
||||
* @return the start position of tree
|
||||
*/
|
||||
long getStartPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree);
|
||||
|
||||
/**
|
||||
* Returns the ending position of the tree within the comment within the file. If tree is not found within
|
||||
* file, or if the ending position is not available,
|
||||
* return {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* returns {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* The given tree should be under the given comment tree, and the given documentation
|
||||
* comment tree should be returned from a {@link DocTrees#getDocCommentTree(com.sun.source.util.TreePath) }
|
||||
* for a tree under the given file.
|
||||
@ -81,16 +81,16 @@ public interface DocSourcePositions extends SourcePositions {
|
||||
* In addition, the following must hold:
|
||||
*
|
||||
* <p>
|
||||
* {@code tree.getStartPosition() <= tree.getEndPosition()} or <br>
|
||||
* {@code tree.getStartPosition() <= tree.getEndPosition()} or <br>
|
||||
* {@code tree.getStartPosition() == NOPOS} or <br>
|
||||
* {@code tree.getEndPosition() == NOPOS}
|
||||
* </p>
|
||||
*
|
||||
* @param file CompilationUnit in which to find tree.
|
||||
* @param file compilation unit in which to find tree
|
||||
* @param comment the comment tree that encloses the tree for which the
|
||||
* position is being sought
|
||||
* @param tree tree for which a position is sought.
|
||||
* @return the start position of tree.
|
||||
* @param tree tree for which a position is sought
|
||||
* @return the end position of tree
|
||||
*/
|
||||
long getEndPosition(CompilationUnitTree file, DocCommentTree comment, DocTree tree);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -70,16 +70,16 @@ import com.sun.source.doctree.ValueTree;
|
||||
import com.sun.source.doctree.VersionTree;
|
||||
|
||||
/**
|
||||
* Factory for creating {@code DocTree} nodes.
|
||||
* Factory for creating {@code DocTree} nodes.
|
||||
*
|
||||
* @implNote The methods in an implementation of this interface may only accept {@code DocTree}
|
||||
* nodes that have been created by the same implementation.
|
||||
* @implNote The methods in an implementation of this interface may only accept {@code DocTree}
|
||||
* nodes that have been created by the same implementation.
|
||||
*
|
||||
* @since 9
|
||||
* @since 9
|
||||
*/
|
||||
public interface DocTreeFactory {
|
||||
/**
|
||||
* Create a new {@code AttributeTree} object, to represent an HTML attribute in an HTML tag.
|
||||
* Creates a new {@code AttributeTree} object, to represent an HTML attribute in an HTML tag.
|
||||
* @param name the name of the attribute
|
||||
* @param vkind the kind of attribute value
|
||||
* @param value the value, if any, of the attribute
|
||||
@ -88,44 +88,43 @@ public interface DocTreeFactory {
|
||||
AttributeTree newAttributeTree(Name name, ValueKind vkind, List<? extends DocTree> value);
|
||||
|
||||
/**
|
||||
* Create a new {@code AuthorTree} object, to represent an {@code {@author } } tag.
|
||||
* Creates a new {@code AuthorTree} object, to represent an {@code @author} tag.
|
||||
* @param name the name of the author
|
||||
* @return an {@code AuthorTree} object
|
||||
*/
|
||||
AuthorTree newAuthorTree(List<? extends DocTree> name);
|
||||
|
||||
/**
|
||||
* Create a new {@code CodeTree} object, to represent a {@code {@code } } tag.
|
||||
* Creates a new {@code LiteralTree} object, to represent a {@code {@code }} tag.
|
||||
* @param text the content of the tag
|
||||
* @return a {@code CodeTree} object
|
||||
* @return a {@code LiteralTree} object
|
||||
*/
|
||||
LiteralTree newCodeTree(TextTree text);
|
||||
|
||||
/**
|
||||
* Create a new {@code CommentTree}, to represent an HTML comment.
|
||||
* Creates a new {@code CommentTree}, to represent an HTML comment.
|
||||
* @param text the content of the comment
|
||||
* @return a {@code CommentTree} object
|
||||
*/
|
||||
CommentTree newCommentTree(String text);
|
||||
|
||||
/**
|
||||
* Create a new {@code DeprecatedTree} object, to represent an {@code {@deprecated } } tag.
|
||||
* Creates a new {@code DeprecatedTree} object, to represent an {@code @deprecated} tag.
|
||||
* @param text the content of the tag
|
||||
* @return a {@code DeprecatedTree} object
|
||||
*/
|
||||
DeprecatedTree newDeprecatedTree(List<? extends DocTree> text);
|
||||
|
||||
/**
|
||||
* Create a new {@code DocCommentTree} object, to represent a complete doc comment.
|
||||
* Creates a new {@code DocCommentTree} object, to represent a complete doc comment.
|
||||
* @param fullBody the entire body of the doc comment
|
||||
* @param tags the block tags in the doc comment
|
||||
* @return a {@code DocCommentTree} object
|
||||
*/
|
||||
DocCommentTree newDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags);
|
||||
|
||||
|
||||
/**
|
||||
* Create a new {@code DocCommentTree} object, to represent the enitire doc comment.
|
||||
* Creates a new {@code DocCommentTree} object, to represent the entire doc comment.
|
||||
* @param fullBody the entire body of the doc comment
|
||||
* @param tags the block tags in the doc comment
|
||||
* @param preamble the meta content of an html file including the body tag
|
||||
@ -138,67 +137,67 @@ public interface DocTreeFactory {
|
||||
List<? extends DocTree> preamble,
|
||||
List<? extends DocTree> postamble);
|
||||
/**
|
||||
* Create a new {@code DocRootTree} object, to represent an {@code {@docroot} } tag.
|
||||
* Creates a new {@code DocRootTree} object, to represent an {@code {@docroot}} tag.
|
||||
* @return a {@code DocRootTree} object
|
||||
*/
|
||||
DocRootTree newDocRootTree();
|
||||
|
||||
/**
|
||||
* Create a new {@code DocTypeTree}, to represent a {@code DOCTYPE} HTML declaration.
|
||||
* Creates a new {@code DocTypeTree}, to represent a {@code DOCTYPE} HTML declaration.
|
||||
* @param text the content of the declaration
|
||||
* @return a {@code CommentTree} object
|
||||
* @return a {@code DocTypeTree} object
|
||||
* @since 10
|
||||
*/
|
||||
DocTypeTree newDocTypeTree(String text);
|
||||
|
||||
/**
|
||||
* Create a new {@code EndElement} object, to represent the end of an HTML element.
|
||||
* Creates a new {@code EndElement} object, to represent the end of an HTML element.
|
||||
* @param name the name of the HTML element
|
||||
* @return an {@code EndElementTree} object
|
||||
*/
|
||||
EndElementTree newEndElementTree(Name name);
|
||||
|
||||
/**
|
||||
* Create a new {@code EntityTree} object, to represent an HTML entity.
|
||||
* @param name the name of the entity, representing the characters between '<' and ';'
|
||||
* Creates a new {@code EntityTree} object, to represent an HTML entity.
|
||||
* @param name the name of the entity, representing the characters between '&' and ';'
|
||||
* in the representation of the entity in an HTML document
|
||||
* @return an {@code EntityTree} object
|
||||
*/
|
||||
EntityTree newEntityTree(Name name);
|
||||
|
||||
/**
|
||||
* Create a new {@code ErroneousTree} object, to represent some unparseable input.
|
||||
* Creates a new {@code ErroneousTree} object, to represent some unparseable input.
|
||||
* @param text the unparseable text
|
||||
* @param diag a diagnostic associated with the unparseable text, or null
|
||||
* @param diag a diagnostic associated with the unparseable text, or {@code null}
|
||||
* @return an {@code ErroneousTree} object
|
||||
*/
|
||||
ErroneousTree newErroneousTree(String text, Diagnostic<JavaFileObject> diag);
|
||||
|
||||
/**
|
||||
* Create a new {@code ExceptionTree} object, to represent an {@code @exception } tag.
|
||||
* Creates a new {@code ThrowsTree} object, to represent an {@code @exception} tag.
|
||||
* @param name the name of the exception
|
||||
* @param description a description of why the exception might be thrown
|
||||
* @return an {@code ExceptionTree} object
|
||||
* @return an {@code ThrowsTree} object
|
||||
*/
|
||||
ThrowsTree newExceptionTree(ReferenceTree name, List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code HiddenTree} object, to represent an {@code {@hidden } } tag.
|
||||
* Creates a new {@code HiddenTree} object, to represent an {@code @hidden} tag.
|
||||
* @param text the content of the tag
|
||||
* @return a {@code HiddenTree} object
|
||||
*/
|
||||
HiddenTree newHiddenTree(List<? extends DocTree> text);
|
||||
|
||||
/**
|
||||
* Create a new {@code IdentifierTree} object, to represent an identifier, such as in a
|
||||
* {@code @param } tag.
|
||||
* Creates a new {@code IdentifierTree} object, to represent an identifier, such as in a
|
||||
* {@code @param} tag.
|
||||
* @param name the name of the identifier
|
||||
* @return an {@code IdentifierTree} object
|
||||
*/
|
||||
IdentifierTree newIdentifierTree(Name name);
|
||||
|
||||
/**
|
||||
* Create a new {@code IndexTree} object, to represent an {@code {@index } } tag.
|
||||
* Creates a new {@code IndexTree} object, to represent an {@code {@index }} tag.
|
||||
* @param term the search term
|
||||
* @param description an optional description of the search term
|
||||
* @return an {@code IndexTree} object
|
||||
@ -206,13 +205,13 @@ public interface DocTreeFactory {
|
||||
IndexTree newIndexTree(DocTree term, List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code InheritDocTree} object, to represent an {@code {@inheritDoc} } tag.
|
||||
* Creates a new {@code InheritDocTree} object, to represent an {@code {@inheritDoc}} tag.
|
||||
* @return an {@code InheritDocTree} object
|
||||
*/
|
||||
InheritDocTree newInheritDocTree();
|
||||
|
||||
/**
|
||||
* Create a new {@code LinkTree} object, to represent a {@code {@link } } tag.
|
||||
* Creates a new {@code LinkTree} object, to represent a {@code {@link }} tag.
|
||||
* @param ref the API element being referenced
|
||||
* @param label an optional label for the link
|
||||
* @return a {@code LinkTree} object
|
||||
@ -220,23 +219,23 @@ public interface DocTreeFactory {
|
||||
LinkTree newLinkTree(ReferenceTree ref, List<? extends DocTree> label);
|
||||
|
||||
/**
|
||||
* Create a new {@code LinkPlainTree} object, to represent a {@code {@linkplain } } tag.
|
||||
* Creates a new {@code LinkTree} object, to represent a {@code {@linkplain }} tag.
|
||||
* @param ref the API element being referenced
|
||||
* @param label an optional label for the link
|
||||
* @return a {@code LinkPlainTree} object
|
||||
* @return a {@code LinkTree} object
|
||||
*/
|
||||
LinkTree newLinkPlainTree(ReferenceTree ref, List<? extends DocTree> label);
|
||||
|
||||
/**
|
||||
* Create a new {@code LiteralTree} object, to represent a {@code {@literal } } tag.
|
||||
* Creates a new {@code LiteralTree} object, to represent a {@code {@literal }} tag.
|
||||
* @param text the content of the tag
|
||||
* @return a {@code LiteralTree} object
|
||||
*/
|
||||
LiteralTree newLiteralTree(TextTree text);
|
||||
|
||||
/**
|
||||
* Create a new {@code ParamTree} object, to represent a {@code @param } tag.
|
||||
* @param isTypeParameter true if this is a type parameter, and false otherwise
|
||||
* Creates a new {@code ParamTree} object, to represent a {@code @param} tag.
|
||||
* @param isTypeParameter {@code true} if this is a type parameter, and {@code false} otherwise
|
||||
* @param name the parameter being described
|
||||
* @param description the description of the parameter
|
||||
* @return a {@code ParamTree} object
|
||||
@ -244,7 +243,7 @@ public interface DocTreeFactory {
|
||||
ParamTree newParamTree(boolean isTypeParameter, IdentifierTree name, List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code ProvidesTree} object, to represent a {@code @provides } tag.
|
||||
* Creates a new {@code ProvidesTree} object, to represent a {@code @provides} tag.
|
||||
* @param name the name of the service type
|
||||
* @param description a description of the service being provided
|
||||
* @return a {@code ProvidesTree} object
|
||||
@ -252,7 +251,7 @@ public interface DocTreeFactory {
|
||||
ProvidesTree newProvidesTree(ReferenceTree name, List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code ReferenceTree} object, to represent a reference to an API element.
|
||||
* Creates a new {@code ReferenceTree} object, to represent a reference to an API element.
|
||||
*
|
||||
* @param signature the doc comment signature of the reference
|
||||
* @return a {@code ReferenceTree} object
|
||||
@ -260,35 +259,35 @@ public interface DocTreeFactory {
|
||||
ReferenceTree newReferenceTree(String signature);
|
||||
|
||||
/**
|
||||
* Create a new {@code ReturnTree} object, to represent a {@code @return } tag.
|
||||
* Creates a new {@code ReturnTree} object, to represent a {@code @return} tag.
|
||||
* @param description the description of the return value of a method
|
||||
* @return a {@code ReturnTree} object
|
||||
*/
|
||||
ReturnTree newReturnTree(List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code SeeTree} object, to represent a {@code @see } tag.
|
||||
* Creates a new {@code SeeTree} object, to represent a {@code @see} tag.
|
||||
* @param reference the reference
|
||||
* @return a {@code SeeTree} object
|
||||
*/
|
||||
SeeTree newSeeTree(List<? extends DocTree> reference);
|
||||
|
||||
/**
|
||||
* Create a new {@code SerialTree} object, to represent a {@code @serial } tag.
|
||||
* Creates a new {@code SerialTree} object, to represent a {@code @serial} tag.
|
||||
* @param description the description for the tag
|
||||
* @return a {@code SerialTree} object
|
||||
*/
|
||||
SerialTree newSerialTree(List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code SerialDataTree} object, to represent a {@code @serialData } tag.
|
||||
* Creates a new {@code SerialDataTree} object, to represent a {@code @serialData} tag.
|
||||
* @param description the description for the tag
|
||||
* @return a {@code SerialDataTree} object
|
||||
*/
|
||||
SerialDataTree newSerialDataTree(List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code SerialFieldTree} object, to represent a {@code @serialField } tag.
|
||||
* Creates a new {@code SerialFieldTree} object, to represent a {@code @serialField} tag.
|
||||
* @param name the name of the field
|
||||
* @param type the type of the field
|
||||
* @param description the description of the field
|
||||
@ -297,23 +296,23 @@ public interface DocTreeFactory {
|
||||
SerialFieldTree newSerialFieldTree(IdentifierTree name, ReferenceTree type, List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code SinceTree} object, to represent a {@code @since } tag.
|
||||
* Creates a new {@code SinceTree} object, to represent a {@code @since} tag.
|
||||
* @param text the content of the tag
|
||||
* @return a {@code SinceTree} object
|
||||
*/
|
||||
SinceTree newSinceTree(List<? extends DocTree> text);
|
||||
|
||||
/**
|
||||
* Create a new {@code StartElementTree} object, to represent the start of an HTML element.
|
||||
* Creates a new {@code StartElementTree} object, to represent the start of an HTML element.
|
||||
* @param name the name of the HTML element
|
||||
* @param attrs the attributes
|
||||
* @param selfClosing true if the start element is marked as self-closing; otherwise false
|
||||
* @param selfClosing {@code true} if the start element is marked as self-closing; otherwise {@code false}
|
||||
* @return a {@code StartElementTree} object
|
||||
*/
|
||||
StartElementTree newStartElementTree(Name name, List<? extends DocTree> attrs, boolean selfClosing);
|
||||
|
||||
/**
|
||||
* Create a new {@code SummaryTree} object, to represent a {@code @summary } tag.
|
||||
* Creates a new {@code SummaryTree} object, to represent a {@code {@summary }} tag.
|
||||
*
|
||||
* @implSpec This implementation throws {@code UnsupportedOperationException}.
|
||||
*
|
||||
@ -326,7 +325,7 @@ public interface DocTreeFactory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new {@code SystemPropertyTree} object, to represent a {@code {@systemProperty } } tag.
|
||||
* Creates a new {@code SystemPropertyTree} object, to represent a {@code {@systemProperty }} tag.
|
||||
*
|
||||
* @param propertyName the system property name
|
||||
* @return a {@code SystemPropertyTree} object
|
||||
@ -335,14 +334,14 @@ public interface DocTreeFactory {
|
||||
SystemPropertyTree newSystemPropertyTree(Name propertyName);
|
||||
|
||||
/**
|
||||
* Create a new {@code TextTree} object, to represent some plain text.
|
||||
* Creates a new {@code TextTree} object, to represent some plain text.
|
||||
* @param text the text
|
||||
* @return a {@code TextTree} object
|
||||
*/
|
||||
TextTree newTextTree(String text);
|
||||
|
||||
/**
|
||||
* Create a new {@code ThrowsTree} object, to represent a {@code @throws } tag.
|
||||
* Creates a new {@code ThrowsTree} object, to represent a {@code @throws} tag.
|
||||
* @param name the name of the exception
|
||||
* @param description a description of why the exception might be thrown
|
||||
* @return a {@code ThrowsTree} object
|
||||
@ -350,7 +349,7 @@ public interface DocTreeFactory {
|
||||
ThrowsTree newThrowsTree(ReferenceTree name, List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code UnknownBlockTagTree} object, to represent an unrecognized block tag.
|
||||
* Creates a new {@code UnknownBlockTagTree} object, to represent an unrecognized block tag.
|
||||
* @param name the name of the block tag
|
||||
* @param content the content
|
||||
* @return an {@code UnknownBlockTagTree} object
|
||||
@ -358,7 +357,7 @@ public interface DocTreeFactory {
|
||||
UnknownBlockTagTree newUnknownBlockTagTree(Name name, List<? extends DocTree> content);
|
||||
|
||||
/**
|
||||
* Create a new {@code UnknownInlineTagTree} object, to represent an unrecognized inline tag.
|
||||
* Creates a new {@code UnknownInlineTagTree} object, to represent an unrecognized inline tag.
|
||||
* @param name the name of the inline tag
|
||||
* @param content the content
|
||||
* @return an {@code UnknownInlineTagTree} object
|
||||
@ -366,7 +365,7 @@ public interface DocTreeFactory {
|
||||
UnknownInlineTagTree newUnknownInlineTagTree(Name name, List<? extends DocTree> content);
|
||||
|
||||
/**
|
||||
* Create a new {@code UsesTree} object, to represent a {@code @uses } tag.
|
||||
* Creates a new {@code UsesTree} object, to represent a {@code @uses} tag.
|
||||
* @param name the name of the service type
|
||||
* @param description a description of how the service will be used
|
||||
* @return a {@code UsesTree} object
|
||||
@ -374,21 +373,21 @@ public interface DocTreeFactory {
|
||||
UsesTree newUsesTree(ReferenceTree name, List<? extends DocTree> description);
|
||||
|
||||
/**
|
||||
* Create a new {@code ValueTree} object, to represent a {@code {@value } } tag.
|
||||
* Creates a new {@code ValueTree} object, to represent a {@code {@value }} tag.
|
||||
* @param ref a reference to the value
|
||||
* @return a {@code ValueTree} object
|
||||
*/
|
||||
ValueTree newValueTree(ReferenceTree ref);
|
||||
|
||||
/**
|
||||
* Create a new {@code VersionTree} object, to represent a {@code {@version } } tag.
|
||||
* Creates a new {@code VersionTree} object, to represent a {@code {@version }} tag.
|
||||
* @param text the content of the tag
|
||||
* @return a {@code VersionTree} object
|
||||
*/
|
||||
VersionTree newVersionTree(List<? extends DocTree> text);
|
||||
|
||||
/**
|
||||
* Set the position to be recorded in subsequent tree nodes created by this factory.
|
||||
* Sets the position to be recorded in subsequent tree nodes created by this factory.
|
||||
* The position should be a character offset relative to the beginning of the source file
|
||||
* or {@link javax.tools.Diagnostic#NOPOS NOPOS}.
|
||||
* @param pos the position
|
||||
@ -397,13 +396,13 @@ public interface DocTreeFactory {
|
||||
DocTreeFactory at(int pos);
|
||||
|
||||
/**
|
||||
* Get the first sentence contained in a list of content.
|
||||
* Gets the first sentence contained in a list of content.
|
||||
* The determination of the first sentence is implementation specific, and may
|
||||
* involve the use of a locale-specific {@link java.text.BreakIterator BreakIterator}
|
||||
* and other heuristics.
|
||||
* The resulting list may share a common set of initial items with the input list.
|
||||
* @param list the list
|
||||
* @return a list containing the first sentence of the list.
|
||||
* @return a list containing the first sentence of the list
|
||||
*/
|
||||
List<DocTree> getFirstSentence(List<? extends DocTree> list);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 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
|
||||
@ -29,11 +29,12 @@ import com.sun.source.doctree.DocCommentTree;
|
||||
import com.sun.source.doctree.DocTree;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A path of tree nodes, typically used to represent the sequence of ancestor
|
||||
* nodes of a tree node up to the top level DocCommentTree node.
|
||||
* nodes of a tree node up to the top-level {@code DocCommentTree} node.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@ -52,7 +53,7 @@ public class DocTreePath implements Iterable<DocTree> {
|
||||
|
||||
/**
|
||||
* Returns a documentation tree path for a tree node within a subtree
|
||||
* identified by a DocTreePath object, or {@code null} if the node is not found.
|
||||
* identified by a {@code DocTreePath} object, or {@code null} if the node is not found.
|
||||
* @param path a path identifying a node within a doc comment tree
|
||||
* @param target a node to be located within the given node
|
||||
* @return a path identifying the target node
|
||||
@ -92,10 +93,10 @@ public class DocTreePath implements Iterable<DocTree> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a DocTreePath for a root node.
|
||||
* Creates a {@code DocTreePath} for a root node.
|
||||
*
|
||||
* @param treePath the TreePath from which the root node was created.
|
||||
* @param t the DocCommentTree to create the path for.
|
||||
* @param treePath the {@code TreePath} from which the root node was created
|
||||
* @param t the {@code DocCommentTree} to create the path for
|
||||
*/
|
||||
public DocTreePath(TreePath treePath, DocCommentTree t) {
|
||||
this.treePath = treePath;
|
||||
@ -105,7 +106,7 @@ public class DocTreePath implements Iterable<DocTree> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a DocTreePath for a child node.
|
||||
* Creates a {@code DocTreePath} for a child node.
|
||||
* @param p the parent node
|
||||
* @param t the child node
|
||||
*/
|
||||
@ -121,16 +122,16 @@ public class DocTreePath implements Iterable<DocTree> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the TreePath associated with this path.
|
||||
* @return the TreePath for this DocTreePath
|
||||
* Returns the {@code TreePath} associated with this path.
|
||||
* @return the {@code TreePath} for this {@code DocTreePath}
|
||||
*/
|
||||
public TreePath getTreePath() {
|
||||
return treePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the DocCommentTree associated with this path.
|
||||
* @return the DocCommentTree for this DocTreePath
|
||||
* Returns the {@code DocCommentTree} associated with this path.
|
||||
* @return the {@code DocCommentTree} for this {@code DocTreePath}
|
||||
*/
|
||||
public DocCommentTree getDocComment() {
|
||||
return docComment;
|
||||
@ -138,7 +139,7 @@ public class DocTreePath implements Iterable<DocTree> {
|
||||
|
||||
/**
|
||||
* Returns the leaf node for this path.
|
||||
* @return the DocTree for this DocTreePath
|
||||
* @return the {@code DocTree} for this {@code DocTreePath}
|
||||
*/
|
||||
public DocTree getLeaf() {
|
||||
return leaf;
|
||||
@ -146,7 +147,7 @@ public class DocTreePath implements Iterable<DocTree> {
|
||||
|
||||
/**
|
||||
* Returns the path for the enclosing node, or {@code null} if there is no enclosing node.
|
||||
* @return DocTreePath of parent
|
||||
* @return {@code DocTreePath} of parent
|
||||
*/
|
||||
public DocTreePath getParentPath() {
|
||||
return parent;
|
||||
@ -154,7 +155,7 @@ public class DocTreePath implements Iterable<DocTree> {
|
||||
|
||||
@Override
|
||||
public Iterator<DocTree> iterator() {
|
||||
return new Iterator<DocTree>() {
|
||||
return new Iterator<>() {
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return next != null;
|
||||
@ -162,6 +163,9 @@ public class DocTreePath implements Iterable<DocTree> {
|
||||
|
||||
@Override
|
||||
public DocTree next() {
|
||||
if (next == null) {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
DocTree t = next.leaf;
|
||||
next = next.parent;
|
||||
return t;
|
||||
|
@ -29,7 +29,7 @@ import com.sun.source.doctree.*;
|
||||
|
||||
|
||||
/**
|
||||
* A TreeVisitor that visits all the child tree nodes.
|
||||
* A DocTreeVisitor that visits all the child tree nodes.
|
||||
* To visit nodes of a particular type, just override the
|
||||
* corresponding visitXYZ method.
|
||||
* Inside your method, call super.visitXYZ to visit descendant
|
||||
@ -463,8 +463,7 @@ public class DocTreeScanner<R,P> implements DocTreeVisitor<R,P> {
|
||||
*/
|
||||
@Override
|
||||
public R visitSummary(SummaryTree node, P p) {
|
||||
R r = scan(node.getSummary(), p);
|
||||
return r;
|
||||
return scan(node.getSummary(), p);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -157,7 +157,7 @@ public abstract class JavacTask implements CompilationTask {
|
||||
*
|
||||
* @implSpec The default implementation of this method does nothing.
|
||||
*
|
||||
* @param provider the provider.
|
||||
* @param provider the provider
|
||||
* @since 13
|
||||
*/
|
||||
public void setParameterNameProvider(ParameterNameProvider provider) {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, 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
|
||||
@ -42,7 +42,7 @@ public interface ParameterNameProvider {
|
||||
*
|
||||
* If the implementation of this method returns null, an automatically synthesized name is used.
|
||||
*
|
||||
* @param parameter the parameter for which the name should be inferred.
|
||||
* @param parameter the parameter for which the name should be inferred
|
||||
* @return a user-friendly name for the parameter, or null if unknown
|
||||
*/
|
||||
public CharSequence getParameterName(VariableElement parameter);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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,7 +53,7 @@ public class SimpleDocTreeVisitor<R,P> implements DocTreeVisitor<R, P> {
|
||||
|
||||
/**
|
||||
* Creates a visitor, with a specified DEFAULT_VALUE.
|
||||
* @param defaultValue the default value to be returned by the default action.
|
||||
* @param defaultValue the default value to be returned by the default action
|
||||
*/
|
||||
protected SimpleDocTreeVisitor(R defaultValue) {
|
||||
DEFAULT_VALUE = defaultValue;
|
||||
@ -84,7 +84,7 @@ public class SimpleDocTreeVisitor<R,P> implements DocTreeVisitor<R, P> {
|
||||
* @param nodes the nodes on which to dispatch
|
||||
* @param p a parameter value to be passed to each appropriate visit method
|
||||
* @return the value return from the last of the visit methods, or null
|
||||
* if none were called.
|
||||
* if none were called
|
||||
*/
|
||||
public final R visit(Iterable<? extends DocTree> nodes, P p) {
|
||||
R r = null;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -54,7 +54,7 @@ public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> {
|
||||
|
||||
/**
|
||||
* Creates a visitor, with a specified DEFAULT_VALUE.
|
||||
* @param defaultValue the default value to be returned by the default action.
|
||||
* @param defaultValue the default value to be returned by the default action
|
||||
*/
|
||||
protected SimpleTreeVisitor(R defaultValue) {
|
||||
DEFAULT_VALUE = defaultValue;
|
||||
@ -85,7 +85,7 @@ public class SimpleTreeVisitor <R,P> implements TreeVisitor<R,P> {
|
||||
* @param nodes the nodes on which to dispatch
|
||||
* @param p a parameter value to be passed to each appropriate visit method
|
||||
* @return the value return from the last of the visit methods, or null
|
||||
* if none were called.
|
||||
* if none were called
|
||||
*/
|
||||
public final R visit(Iterable<? extends Tree> nodes, P p) {
|
||||
R r = null;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 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
|
||||
@ -40,7 +40,7 @@ public interface SourcePositions {
|
||||
/**
|
||||
* Returns the starting position of tree within file. If tree is not found within
|
||||
* file, or if the starting position is not available,
|
||||
* return {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* returns {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* The returned position must be at the start of the yield of this tree, that
|
||||
* is for any sub-tree of this tree, the following must hold:
|
||||
*
|
||||
@ -50,16 +50,16 @@ public interface SourcePositions {
|
||||
* {@code subtree.getStartPosition() == NOPOS}
|
||||
* </p>
|
||||
*
|
||||
* @param file CompilationUnit in which to find tree.
|
||||
* @param tree tree for which a position is sought.
|
||||
* @return the start position of tree.
|
||||
* @param file CompilationUnit in which to find tree
|
||||
* @param tree tree for which a position is sought
|
||||
* @return the start position of tree
|
||||
*/
|
||||
long getStartPosition(CompilationUnitTree file, Tree tree);
|
||||
|
||||
/**
|
||||
* Returns the ending position of tree within file. If tree is not found within
|
||||
* file, or if the ending position is not available,
|
||||
* return {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* returns {@link javax.tools.Diagnostic#NOPOS}.
|
||||
* The returned position must be at the end of the yield of this tree,
|
||||
* that is for any sub-tree of this tree, the following must hold:
|
||||
*
|
||||
@ -72,14 +72,14 @@ public interface SourcePositions {
|
||||
* In addition, the following must hold:
|
||||
*
|
||||
* <p>
|
||||
* {@code tree.getStartPosition() <= tree.getEndPosition()} or <br>
|
||||
* {@code tree.getStartPosition() <= tree.getEndPosition()} or <br>
|
||||
* {@code tree.getStartPosition() == NOPOS} or <br>
|
||||
* {@code tree.getEndPosition() == NOPOS}
|
||||
* </p>
|
||||
*
|
||||
* @param file CompilationUnit in which to find tree.
|
||||
* @param tree tree for which a position is sought.
|
||||
* @return the end position of tree.
|
||||
* @param file CompilationUnit in which to find tree
|
||||
* @param tree tree for which a position is sought
|
||||
* @return the end position of tree
|
||||
*/
|
||||
long getEndPosition(CompilationUnitTree file, Tree tree);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 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
|
||||
@ -26,6 +26,7 @@
|
||||
package com.sun.source.util;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.sun.source.tree.*;
|
||||
@ -138,11 +139,11 @@ public class TreePath implements Iterable<Tree> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterates from leaves to root.
|
||||
* Iterates from leaves to root.
|
||||
*/
|
||||
@Override
|
||||
public Iterator<Tree> iterator() {
|
||||
return new Iterator<Tree>() {
|
||||
return new Iterator<>() {
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return next != null;
|
||||
@ -150,6 +151,9 @@ public class TreePath implements Iterable<Tree> {
|
||||
|
||||
@Override
|
||||
public Tree next() {
|
||||
if (next == null) {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
Tree t = next.leaf;
|
||||
next = next.parent;
|
||||
return t;
|
||||
|
@ -236,8 +236,8 @@ public abstract class Trees {
|
||||
|
||||
/**
|
||||
* Returns the original type from the ErrorType object.
|
||||
* @param errorType The errorType for which we want to get the original type.
|
||||
* @return javax.lang.model.type.TypeMirror corresponding to the original type, replaced by the ErrorType.
|
||||
* @param errorType the errorType for which we want to get the original type
|
||||
* @return the type mirror corresponding to the original type, replaced by the ErrorType
|
||||
*/
|
||||
public abstract TypeMirror getOriginalType(ErrorType errorType);
|
||||
|
||||
@ -257,7 +257,7 @@ public abstract class Trees {
|
||||
/**
|
||||
* Returns the lub of an exception parameter declared in a catch clause.
|
||||
* @param tree the tree for the catch clause
|
||||
* @return The lub of the exception parameter
|
||||
* @return the lub of the exception parameter
|
||||
*/
|
||||
public abstract TypeMirror getLub(CatchTree tree);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2019, 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
|
||||
@ -25,16 +25,13 @@
|
||||
|
||||
package com.sun.tools.javac.parser;
|
||||
|
||||
import java.text.BreakIterator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.sun.source.doctree.AttributeTree.ValueKind;
|
||||
import com.sun.source.doctree.ErroneousTree;
|
||||
import com.sun.source.doctree.UnknownBlockTagTree;
|
||||
import com.sun.tools.javac.parser.DocCommentParser.TagParser.Kind;
|
||||
import com.sun.tools.javac.parser.Tokens.Comment;
|
||||
import com.sun.tools.javac.parser.Tokens.TokenKind;
|
||||
import com.sun.tools.javac.tree.DCTree;
|
||||
import com.sun.tools.javac.tree.DCTree.DCAttribute;
|
||||
import com.sun.tools.javac.tree.DCTree.DCDocComment;
|
||||
@ -44,11 +41,9 @@ import com.sun.tools.javac.tree.DCTree.DCIdentifier;
|
||||
import com.sun.tools.javac.tree.DCTree.DCReference;
|
||||
import com.sun.tools.javac.tree.DCTree.DCText;
|
||||
import com.sun.tools.javac.tree.DocTreeMaker;
|
||||
import com.sun.tools.javac.tree.JCTree;
|
||||
import com.sun.tools.javac.util.DiagnosticSource;
|
||||
import com.sun.tools.javac.util.List;
|
||||
import com.sun.tools.javac.util.ListBuffer;
|
||||
import com.sun.tools.javac.util.Log;
|
||||
import com.sun.tools.javac.util.Name;
|
||||
import com.sun.tools.javac.util.Names;
|
||||
import com.sun.tools.javac.util.Position;
|
||||
@ -71,33 +66,31 @@ public class DocCommentParser {
|
||||
}
|
||||
}
|
||||
|
||||
private enum Phase {PREAMBLE, BODY, POSTAMBLE};
|
||||
private enum Phase {PREAMBLE, BODY, POSTAMBLE}
|
||||
|
||||
final ParserFactory fac;
|
||||
final DiagnosticSource diagSource;
|
||||
final Comment comment;
|
||||
final DocTreeMaker m;
|
||||
final Names names;
|
||||
final boolean isFileContent;
|
||||
|
||||
BreakIterator sentenceBreaker;
|
||||
private final ParserFactory fac;
|
||||
private final DiagnosticSource diagSource;
|
||||
private final Comment comment;
|
||||
private final DocTreeMaker m;
|
||||
private final Names names;
|
||||
private final boolean isFileContent;
|
||||
|
||||
/** The input buffer, index of most recent character read,
|
||||
* index of one past last character in buffer.
|
||||
*/
|
||||
protected char[] buf;
|
||||
protected int bp;
|
||||
protected int buflen;
|
||||
private char[] buf;
|
||||
private int bp;
|
||||
private int buflen;
|
||||
|
||||
/** The current character.
|
||||
*/
|
||||
protected char ch;
|
||||
private char ch;
|
||||
|
||||
int textStart = -1;
|
||||
int lastNonWhite = -1;
|
||||
boolean newline = true;
|
||||
private int textStart = -1;
|
||||
private int lastNonWhite = -1;
|
||||
private boolean newline = true;
|
||||
|
||||
Map<Name, TagParser> tagParsers;
|
||||
private final Map<Name, TagParser> tagParsers;
|
||||
|
||||
public DocCommentParser(ParserFactory fac, DiagnosticSource diagSource,
|
||||
Comment comment, boolean isFileContent) {
|
||||
@ -107,7 +100,7 @@ public class DocCommentParser {
|
||||
names = fac.names;
|
||||
this.isFileContent = isFileContent;
|
||||
m = fac.docTreeMaker;
|
||||
initTagParsers();
|
||||
tagParsers = createTagParsers();
|
||||
}
|
||||
|
||||
public DocCommentParser(ParserFactory fac, DiagnosticSource diagSource, Comment comment) {
|
||||
@ -161,7 +154,7 @@ public class DocCommentParser {
|
||||
/**
|
||||
* Read block content, consisting of text, html and inline tags.
|
||||
* Terminated by the end of input, or the beginning of the next block tag:
|
||||
* i.e. @ as the first non-whitespace character on a line.
|
||||
* that is, @ as the first non-whitespace character on a line.
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
protected List<DCTree> blockContent(Phase phase) {
|
||||
@ -337,7 +330,7 @@ public class DocCommentParser {
|
||||
if (tree != null) {
|
||||
return tree.setEndPos(bp);
|
||||
}
|
||||
} else { // handle block tags (ex: @see) in inline content
|
||||
} else { // handle block tags (for example, @see) in inline content
|
||||
inlineText(WhitespaceRetentionPolicy.REMOVE_ALL); // skip content
|
||||
nextChar();
|
||||
}
|
||||
@ -349,7 +342,7 @@ public class DocCommentParser {
|
||||
}
|
||||
}
|
||||
|
||||
private static enum WhitespaceRetentionPolicy {
|
||||
private enum WhitespaceRetentionPolicy {
|
||||
RETAIN_ALL,
|
||||
REMOVE_FIRST_SPACE,
|
||||
REMOVE_ALL
|
||||
@ -540,7 +533,7 @@ public class DocCommentParser {
|
||||
}
|
||||
|
||||
/**
|
||||
* Read a term ie. one word.
|
||||
* Read a term (that is, one word).
|
||||
* It is an error if the beginning of the next tag is detected.
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
@ -720,7 +713,7 @@ public class DocCommentParser {
|
||||
if (ch == '>') {
|
||||
nextChar();
|
||||
}
|
||||
// 2. skip any whitespce
|
||||
// 2. skip any whitespace
|
||||
while (ch != -1 && Character.isWhitespace(ch)) {
|
||||
nextChar();
|
||||
}
|
||||
@ -793,7 +786,7 @@ public class DocCommentParser {
|
||||
if (s.charAt(0) != ch) {
|
||||
return false;
|
||||
} else {
|
||||
s = s.substring(1, s.length());
|
||||
s = s.substring(1);
|
||||
nextChar();
|
||||
}
|
||||
}
|
||||
@ -1076,14 +1069,13 @@ public class DocCommentParser {
|
||||
return new String(buf, start, end - start);
|
||||
}
|
||||
|
||||
static abstract class TagParser {
|
||||
private static abstract class TagParser {
|
||||
enum Kind { INLINE, BLOCK }
|
||||
|
||||
final Kind kind;
|
||||
final DCTree.Kind treeKind;
|
||||
final boolean retainWhiteSpace;
|
||||
|
||||
|
||||
TagParser(Kind k, DCTree.Kind tk) {
|
||||
kind = k;
|
||||
treeKind = tk;
|
||||
@ -1108,12 +1100,13 @@ public class DocCommentParser {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see <a href="http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html#CHDJGIJB">Javadoc Tags</a>
|
||||
* @see <a href="https://docs.oracle.com/en/java/javase/14/docs/specs/javadoc/doc-comment-spec.html">Javadoc Tags</a>
|
||||
*/
|
||||
private void initTagParsers() {
|
||||
private Map<Name, TagParser> createTagParsers() {
|
||||
TagParser[] parsers = {
|
||||
// @author name-text
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.AUTHOR) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.AUTHOR) {
|
||||
@Override
|
||||
public DCTree parse(int pos) {
|
||||
List<DCTree> name = blockContent();
|
||||
return m.at(pos).newAuthorTree(name);
|
||||
@ -1121,7 +1114,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// {@code text}
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.CODE, true) {
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.CODE, true) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
DCTree text = inlineText(WhitespaceRetentionPolicy.REMOVE_FIRST_SPACE);
|
||||
nextChar();
|
||||
@ -1130,7 +1124,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @deprecated deprecated-text
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.DEPRECATED) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.DEPRECATED) {
|
||||
@Override
|
||||
public DCTree parse(int pos) {
|
||||
List<DCTree> reason = blockContent();
|
||||
return m.at(pos).newDeprecatedTree(reason);
|
||||
@ -1138,7 +1133,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// {@docRoot}
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.DOC_ROOT) {
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.DOC_ROOT) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
if (ch == '}') {
|
||||
nextChar();
|
||||
@ -1151,7 +1147,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @exception class-name description
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.EXCEPTION) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.EXCEPTION) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
skipWhitespace();
|
||||
DCReference ref = reference(false);
|
||||
@ -1161,15 +1158,17 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @hidden hidden-text
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.HIDDEN) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.HIDDEN) {
|
||||
@Override
|
||||
public DCTree parse(int pos) {
|
||||
List<DCTree> reason = blockContent();
|
||||
return m.at(pos).newHiddenTree(reason);
|
||||
}
|
||||
},
|
||||
|
||||
// @index search-term options-description
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.INDEX) {
|
||||
// {@index search-term options-description}
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.INDEX) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
skipWhitespace();
|
||||
if (ch == '}') {
|
||||
@ -1191,7 +1190,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// {@inheritDoc}
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.INHERIT_DOC) {
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.INHERIT_DOC) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
if (ch == '}') {
|
||||
nextChar();
|
||||
@ -1204,7 +1204,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// {@link package.class#member label}
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.LINK) {
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.LINK) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
DCReference ref = reference(true);
|
||||
List<DCTree> label = inlineContent();
|
||||
@ -1213,7 +1214,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// {@linkplain package.class#member label}
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.LINK_PLAIN) {
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.LINK_PLAIN) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
DCReference ref = reference(true);
|
||||
List<DCTree> label = inlineContent();
|
||||
@ -1222,7 +1224,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// {@literal text}
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.LITERAL, true) {
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.LITERAL, true) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
DCTree text = inlineText(WhitespaceRetentionPolicy.REMOVE_FIRST_SPACE);
|
||||
nextChar();
|
||||
@ -1231,7 +1234,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @param parameter-name description
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.PARAM) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.PARAM) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
skipWhitespace();
|
||||
|
||||
@ -1256,7 +1260,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @provides service-name description
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.PROVIDES) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.PROVIDES) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
skipWhitespace();
|
||||
DCReference ref = reference(true);
|
||||
@ -1266,7 +1271,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @return description
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.RETURN) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.RETURN) {
|
||||
@Override
|
||||
public DCTree parse(int pos) {
|
||||
List<DCTree> description = blockContent();
|
||||
return m.at(pos).newReturnTree(description);
|
||||
@ -1274,7 +1280,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @see reference | quoted-string | HTML
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.SEE) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.SEE) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
skipWhitespace();
|
||||
switch (ch) {
|
||||
@ -1317,7 +1324,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @serialData data-description
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.SERIAL_DATA) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.SERIAL_DATA) {
|
||||
@Override
|
||||
public DCTree parse(int pos) {
|
||||
List<DCTree> description = blockContent();
|
||||
return m.at(pos).newSerialDataTree(description);
|
||||
@ -1325,7 +1333,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @serialField field-name field-type description
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.SERIAL_FIELD) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.SERIAL_FIELD) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
skipWhitespace();
|
||||
DCIdentifier name = identifier();
|
||||
@ -1341,7 +1350,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @serial field-description | include | exclude
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.SERIAL) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.SERIAL) {
|
||||
@Override
|
||||
public DCTree parse(int pos) {
|
||||
List<DCTree> description = blockContent();
|
||||
return m.at(pos).newSerialTree(description);
|
||||
@ -1349,23 +1359,26 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @since since-text
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.SINCE) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.SINCE) {
|
||||
@Override
|
||||
public DCTree parse(int pos) {
|
||||
List<DCTree> description = blockContent();
|
||||
return m.at(pos).newSinceTree(description);
|
||||
}
|
||||
},
|
||||
|
||||
// @summary summary-text
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.SUMMARY) {
|
||||
// {@summary summary-text}
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.SUMMARY) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
List<DCTree> summary = inlineContent();
|
||||
return m.at(pos).newSummaryTree(summary);
|
||||
}
|
||||
},
|
||||
|
||||
// @systemProperty property-name
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.SYSTEM_PROPERTY) {
|
||||
// {@systemProperty property-name}
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.SYSTEM_PROPERTY) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
skipWhitespace();
|
||||
if (ch == '}') {
|
||||
@ -1387,7 +1400,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @throws class-name description
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.THROWS) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.THROWS) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
skipWhitespace();
|
||||
DCReference ref = reference(false);
|
||||
@ -1397,7 +1411,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @uses service-name description
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.USES) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.USES) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
skipWhitespace();
|
||||
DCReference ref = reference(true);
|
||||
@ -1407,7 +1422,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// {@value package.class#field}
|
||||
new TagParser(Kind.INLINE, DCTree.Kind.VALUE) {
|
||||
new TagParser(TagParser.Kind.INLINE, DCTree.Kind.VALUE) {
|
||||
@Override
|
||||
public DCTree parse(int pos) throws ParseException {
|
||||
DCReference ref = reference(true);
|
||||
skipWhitespace();
|
||||
@ -1421,7 +1437,8 @@ public class DocCommentParser {
|
||||
},
|
||||
|
||||
// @version version-text
|
||||
new TagParser(Kind.BLOCK, DCTree.Kind.VERSION) {
|
||||
new TagParser(TagParser.Kind.BLOCK, DCTree.Kind.VERSION) {
|
||||
@Override
|
||||
public DCTree parse(int pos) {
|
||||
List<DCTree> description = blockContent();
|
||||
return m.at(pos).newVersionTree(description);
|
||||
@ -1429,10 +1446,11 @@ public class DocCommentParser {
|
||||
},
|
||||
};
|
||||
|
||||
tagParsers = new HashMap<>();
|
||||
Map<Name, TagParser> tagParsers = new HashMap<>();
|
||||
for (TagParser p: parsers)
|
||||
tagParsers.put(names.fromString(p.getTreeKind().tagName), p);
|
||||
|
||||
return tagParsers;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
@ -34,7 +34,6 @@ import com.sun.tools.javac.tree.DocCommentTable;
|
||||
import com.sun.tools.javac.tree.JCTree;
|
||||
import com.sun.tools.javac.util.DiagnosticSource;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* <p><b>This is NOT part of any supported API.
|
||||
@ -52,9 +51,9 @@ public class LazyDocCommentTable implements DocCommentTable {
|
||||
}
|
||||
}
|
||||
|
||||
ParserFactory fac;
|
||||
DiagnosticSource diagSource;
|
||||
Map<JCTree, Entry> table;
|
||||
private final ParserFactory fac;
|
||||
private final DiagnosticSource diagSource;
|
||||
private final Map<JCTree, Entry> table;
|
||||
|
||||
LazyDocCommentTable(ParserFactory fac) {
|
||||
this.fac = fac;
|
||||
@ -62,20 +61,24 @@ public class LazyDocCommentTable implements DocCommentTable {
|
||||
table = new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComment(JCTree tree) {
|
||||
return table.containsKey(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Comment getComment(JCTree tree) {
|
||||
Entry e = table.get(tree);
|
||||
return (e == null) ? null : e.comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommentText(JCTree tree) {
|
||||
Comment c = getComment(tree);
|
||||
return (c == null) ? null : c.getText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DCDocComment getCommentTree(JCTree tree) {
|
||||
Entry e = table.get(tree);
|
||||
if (e == null)
|
||||
@ -85,6 +88,7 @@ public class LazyDocCommentTable implements DocCommentTable {
|
||||
return e.tree;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putComment(JCTree tree, Comment c) {
|
||||
table.put(tree, new Entry(c));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 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
|
||||
@ -41,27 +41,27 @@ public interface DocCommentTable {
|
||||
/**
|
||||
* Check if a tree node has a corresponding doc comment.
|
||||
*/
|
||||
public boolean hasComment(JCTree tree);
|
||||
boolean hasComment(JCTree tree);
|
||||
|
||||
/**
|
||||
* Get the Comment token containing the doc comment, if any, for a tree node.
|
||||
*/
|
||||
public Comment getComment(JCTree tree);
|
||||
Comment getComment(JCTree tree);
|
||||
|
||||
/**
|
||||
* Get the plain text of the doc comment, if any, for a tree node.
|
||||
*/
|
||||
public String getCommentText(JCTree tree);
|
||||
String getCommentText(JCTree tree);
|
||||
|
||||
/**
|
||||
* Get the parsed form of the doc comment as a DocTree. If any errors
|
||||
* are detected during parsing, they will be reported via
|
||||
* {@link ErroneousTree ErroneousTree} nodes within the resulting tree.
|
||||
*/
|
||||
public DCDocComment getCommentTree(JCTree tree);
|
||||
DCDocComment getCommentTree(JCTree tree);
|
||||
|
||||
/**
|
||||
* Set the Comment to be associated with a tree node.
|
||||
*/
|
||||
public void putComment(JCTree tree, Comment c);
|
||||
void putComment(JCTree tree, Comment c);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 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
|
||||
@ -117,11 +117,11 @@ public class DocPretty implements DocTreeVisitor<Void,Void> {
|
||||
|
||||
final String lineSep = System.getProperty("line.separator");
|
||||
|
||||
/**************************************************************************
|
||||
/* ************************************************************************
|
||||
* Traversal methods
|
||||
*************************************************************************/
|
||||
|
||||
/** Exception to propagate IOException through visitXXX methods */
|
||||
/** Exception to propagate IOException through visitXYZ methods */
|
||||
private static class UncheckedIOException extends Error {
|
||||
static final long serialVersionUID = -4032692679158424751L;
|
||||
UncheckedIOException(IOException e) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -38,7 +38,6 @@ import javax.tools.Diagnostic;
|
||||
import javax.tools.JavaFileObject;
|
||||
|
||||
import com.sun.source.doctree.AttributeTree.ValueKind;
|
||||
import com.sun.source.doctree.DocCommentTree;
|
||||
import com.sun.source.doctree.DocTree;
|
||||
import com.sun.source.doctree.DocTree.Kind;
|
||||
import com.sun.source.doctree.EndElementTree;
|
||||
@ -46,15 +45,12 @@ import com.sun.source.doctree.IdentifierTree;
|
||||
import com.sun.source.doctree.ReferenceTree;
|
||||
import com.sun.source.doctree.StartElementTree;
|
||||
import com.sun.source.doctree.TextTree;
|
||||
import com.sun.source.doctree.ProvidesTree;
|
||||
import com.sun.source.doctree.UsesTree;
|
||||
import com.sun.source.util.DocTreeFactory;
|
||||
import com.sun.tools.doclint.HtmlTag;
|
||||
import com.sun.tools.javac.api.JavacTrees;
|
||||
import com.sun.tools.javac.parser.ParserFactory;
|
||||
import com.sun.tools.javac.parser.ReferenceParser;
|
||||
import com.sun.tools.javac.parser.Tokens.Comment;
|
||||
import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle;
|
||||
import com.sun.tools.javac.tree.DCTree.DCAttribute;
|
||||
import com.sun.tools.javac.tree.DCTree.DCAuthor;
|
||||
import com.sun.tools.javac.tree.DCTree.DCComment;
|
||||
@ -552,7 +548,7 @@ public class DocTreeMaker implements DocTreeFactory {
|
||||
: null;
|
||||
int sbreak = getSentenceBreak(s, peekedNext);
|
||||
if (sbreak > 0) {
|
||||
s = removeTrailingWhitespace(s.substring(0, sbreak));
|
||||
s = s.substring(0, sbreak).stripTrailing();
|
||||
DCText text = this.at(spos).newTextTree(s);
|
||||
fs.add(text);
|
||||
foundFirstSentence = true;
|
||||
@ -568,7 +564,7 @@ public class DocTreeMaker implements DocTreeFactory {
|
||||
boolean sbrk = isSentenceBreak(peekedNext, false);
|
||||
if (sbrk) {
|
||||
DocTree next = itr.next();
|
||||
s = removeTrailingWhitespace(s);
|
||||
s = s.stripTrailing();
|
||||
DCText text = this.at(spos).newTextTree(s);
|
||||
fs.add(text);
|
||||
body.add((DCTree) next);
|
||||
@ -727,16 +723,6 @@ public class DocTreeMaker implements DocTreeFactory {
|
||||
return -1;
|
||||
}
|
||||
|
||||
private String removeTrailingWhitespace(String s) {
|
||||
for (int i = s.length() - 1 ; i >= 0 ; i--) {
|
||||
char ch = s.charAt(i);
|
||||
if (!Character.isWhitespace(ch)) {
|
||||
return s.substring(0, i + 1);
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private List<DCTree> cast(List<? extends DocTree> list) {
|
||||
return (List<DCTree>) list;
|
||||
|
@ -32,7 +32,7 @@ import com.sun.source.tree.ModuleTree.ModuleKind;
|
||||
import com.sun.tools.javac.code.*;
|
||||
import com.sun.tools.javac.tree.JCTree.*;
|
||||
import com.sun.tools.javac.util.*;
|
||||
import com.sun.tools.javac.util.List;
|
||||
|
||||
import static com.sun.tools.javac.code.Flags.*;
|
||||
import static com.sun.tools.javac.code.Flags.ANNOTATION;
|
||||
import static com.sun.tools.javac.tree.JCTree.Tag.*;
|
||||
@ -166,11 +166,11 @@ public class Pretty extends JCTree.Visitor {
|
||||
|
||||
String lineSep = System.getProperty("line.separator");
|
||||
|
||||
/**************************************************************************
|
||||
/* ************************************************************************
|
||||
* Traversal methods
|
||||
*************************************************************************/
|
||||
|
||||
/** Exception to propagate IOException through visitXXX methods */
|
||||
/** Exception to propagate IOException through visitXYZ methods */
|
||||
private static class UncheckedIOException extends Error {
|
||||
static final long serialVersionUID = -4032692679158424751L;
|
||||
UncheckedIOException(IOException e) {
|
||||
|
@ -34,7 +34,6 @@ import javax.lang.model.element.ModuleElement;
|
||||
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
|
||||
import jdk.javadoc.internal.doclets.toolkit.Content;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
|
||||
|
@ -33,7 +33,6 @@ import javax.lang.model.element.PackageElement;
|
||||
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
|
||||
import jdk.javadoc.internal.doclets.toolkit.Content;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
|
||||
|
@ -49,7 +49,6 @@ import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
|
||||
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
|
||||
import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
|
||||
import jdk.javadoc.internal.doclets.toolkit.Content;
|
||||
import jdk.javadoc.internal.doclets.toolkit.DocFileElement;
|
||||
import jdk.javadoc.internal.doclets.toolkit.DocletElement;
|
||||
import jdk.javadoc.internal.doclets.toolkit.Resources;
|
||||
import jdk.javadoc.internal.doclets.toolkit.builders.SerializedFormBuilder;
|
||||
|
@ -46,7 +46,7 @@ import java.util.regex.Pattern;
|
||||
* The description of some members refer to "elements".
|
||||
* This typically refers to "HTML elements", but may in some cases refer to
|
||||
* or {@link javax.lang.model.element.Element "language model elements"}.
|
||||
* The usage is made explicit when it is not clear fromthe surrounding context.
|
||||
* The usage is made explicit when it is not clear from the surrounding context.
|
||||
*
|
||||
* @see <a href="https://html.spec.whatwg.org/#classes>WhatWG: {@code class} attribute</a>
|
||||
*/
|
||||
@ -459,7 +459,7 @@ public enum HtmlStyle {
|
||||
/**
|
||||
* The class of the last column of cells in a table.
|
||||
* This is typically the "description" column, where the description is
|
||||
* the first sentence of the elemen ts documentation comment.
|
||||
* the first sentence of the elements documentation comment.
|
||||
*/
|
||||
colLast,
|
||||
|
||||
|
@ -491,7 +491,7 @@ public class HtmlTree extends Content {
|
||||
}
|
||||
|
||||
/**
|
||||
* Craetes an HTML {@code HTML} element with the given {@code lang} attribute,
|
||||
* Creates an HTML {@code HTML} element with the given {@code lang} attribute,
|
||||
* and {@code HEAD} and {@code BODY} contents.
|
||||
*
|
||||
* @param lang the value for the {@code lang} attribute
|
||||
|
@ -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
|
||||
@ -26,7 +26,6 @@
|
||||
package jdk.javadoc.internal.doclets.toolkit;
|
||||
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
|
||||
/**
|
||||
* The interface for writing annotation type required member output.
|
||||
|
@ -38,7 +38,6 @@ import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -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
|
||||
@ -26,7 +26,6 @@
|
||||
package jdk.javadoc.internal.doclets.toolkit;
|
||||
|
||||
import javax.lang.model.element.ExecutableElement;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
|
||||
/**
|
||||
* The interface for writing constructor output.
|
||||
|
@ -28,7 +28,6 @@ package jdk.javadoc.internal.doclets.toolkit;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A class to create content for javadoc output pages.
|
||||
|
@ -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
|
||||
@ -25,7 +25,6 @@
|
||||
|
||||
package jdk.javadoc.internal.doclets.toolkit;
|
||||
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.element.VariableElement;
|
||||
|
||||
|
||||
|
@ -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
|
||||
@ -25,8 +25,6 @@
|
||||
|
||||
package jdk.javadoc.internal.doclets.toolkit;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* The interface for writing class output.
|
||||
*
|
||||
|
@ -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
|
||||
@ -26,7 +26,6 @@
|
||||
package jdk.javadoc.internal.doclets.toolkit;
|
||||
|
||||
import javax.lang.model.element.ExecutableElement;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
|
||||
/**
|
||||
* The interface for writing property output.
|
||||
|
@ -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,7 +55,7 @@ public interface WriterFactory {
|
||||
/**
|
||||
* Return the writer for the package summary.
|
||||
*
|
||||
* @param packageElement the package being documented.
|
||||
* @param packageElement the package being documented
|
||||
* @return the writer for the package summary. Return null if this
|
||||
* writer is not supported by the doclet.
|
||||
*/
|
||||
@ -64,7 +64,7 @@ public interface WriterFactory {
|
||||
/**
|
||||
* Return the writer for the module summary.
|
||||
*
|
||||
* @param mdle the module being documented.
|
||||
* @param mdle the module being documented
|
||||
* @return the writer for the module summary. Return null if this
|
||||
* writer is not supported by the doclet.
|
||||
*/
|
||||
@ -122,7 +122,7 @@ public interface WriterFactory {
|
||||
* Return the field writer for a given type element,
|
||||
* or null if this writer is not supported by the doclet.
|
||||
*
|
||||
* @param classWriter the writer for the class being documented.
|
||||
* @param classWriter the writer for the class being documented
|
||||
* @return the field writer for the given class. Return null if this
|
||||
* writer is not supported by the doclet.
|
||||
*/
|
||||
@ -132,7 +132,7 @@ public interface WriterFactory {
|
||||
* Return the property writer for a given class,
|
||||
* or null if this writer is not supported by the doclet.
|
||||
*
|
||||
* @param classWriter the writer for the type elemen t being documented.
|
||||
* @param classWriter the writer for the type element being documented
|
||||
* @return the property writer
|
||||
*/
|
||||
PropertyWriter getPropertyWriter(ClassWriter classWriter);
|
||||
@ -150,9 +150,9 @@ public interface WriterFactory {
|
||||
* Return the specified member summary writer for a given type element,
|
||||
* or null if this writer is not supported by the doclet.
|
||||
*
|
||||
* @param classWriter the writer for the class being documented.
|
||||
* @param classWriter the writer for the class being documented
|
||||
* @param memberType the {@link VisibleMemberTable} member type indicating
|
||||
* the type of member summary that should be returned.
|
||||
* the type of member summary that should be returned
|
||||
* @return the summary writer
|
||||
*
|
||||
* @see VisibleMemberTable
|
||||
|
@ -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
|
||||
@ -31,7 +31,6 @@ import java.util.Set;
|
||||
import javax.lang.model.element.ModuleElement;
|
||||
import javax.lang.model.element.PackageElement;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.type.TypeMirror;
|
||||
|
||||
import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
|
||||
import jdk.javadoc.internal.doclets.toolkit.ClassWriter;
|
||||
|
@ -49,15 +49,16 @@ public class BaseTaglet implements Taglet {
|
||||
private final Set<Location> sites;
|
||||
|
||||
BaseTaglet(DocTree.Kind tagKind, boolean inline, Set<Location> sites) {
|
||||
this.tagKind = tagKind;
|
||||
this.name = tagKind.tagName;
|
||||
this.inline = inline;
|
||||
this.sites = sites;
|
||||
this(tagKind.tagName, tagKind, inline, sites);
|
||||
}
|
||||
|
||||
BaseTaglet(String name, boolean inline, Set<Location> sites) {
|
||||
this.tagKind = inline ? DocTree.Kind.UNKNOWN_INLINE_TAG : DocTree.Kind.UNKNOWN_BLOCK_TAG;
|
||||
this(name, inline ? DocTree.Kind.UNKNOWN_INLINE_TAG : DocTree.Kind.UNKNOWN_BLOCK_TAG, inline, sites);
|
||||
}
|
||||
|
||||
private BaseTaglet(String name, DocTree.Kind tagKind, boolean inline, Set<Location> sites) {
|
||||
this.name = name;
|
||||
this.tagKind = tagKind;
|
||||
this.inline = inline;
|
||||
this.sites = sites;
|
||||
}
|
||||
@ -67,93 +68,51 @@ public class BaseTaglet implements Taglet {
|
||||
return sites;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this {@code Taglet} can be used in constructor documentation.
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this {@code Taglet} can be used in field documentation.
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this {@code Taglet} can be used in method documentation.
|
||||
*
|
||||
* @return true if this {@code Taglet} can be used in method documentation and false
|
||||
* otherwise.
|
||||
*/
|
||||
@Override
|
||||
public final boolean inConstructor() {
|
||||
return sites.contains(Location.CONSTRUCTOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean inMethod() {
|
||||
return sites.contains(Location.METHOD);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this {@code Taglet} can be used in overview documentation.
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this {@code Taglet} can be used in module documentation.
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this {@code Taglet} can be used in package documentation.
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this {@code Taglet} can be used in type documentation (classes or interfaces).
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this {@code Taglet} is an inline tag.
|
||||
*
|
||||
* @return true if this {@code Taglet} represents an inline tag and false otherwise.
|
||||
*/
|
||||
@Override
|
||||
public final boolean isInlineTag() {
|
||||
return inline;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the kind of trees recognized by this taglet.
|
||||
*
|
||||
@ -163,23 +122,13 @@ public class BaseTaglet implements Taglet {
|
||||
return tagKind;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of this tag.
|
||||
*
|
||||
* @return the name of this tag.
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not this taglet accepts a {@code DocTree} node.
|
||||
* The taglet accepts a tree node if it has the same kind, and
|
||||
* if the kind is {@code UNKNOWN_BLOCK_TAG} the same tag name.
|
||||
*
|
||||
* @param tree the tree node
|
||||
* @return {@code true} if this taglet accepts this tree node.
|
||||
* @return {@code true} if this taglet accepts this tree node
|
||||
*/
|
||||
public boolean accepts(DocTree tree) {
|
||||
return (tree.getKind() == DocTree.Kind.UNKNOWN_BLOCK_TAG
|
||||
|
@ -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
|
||||
@ -28,7 +28,7 @@ package jdk.javadoc.internal.doclets.toolkit.taglets;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
|
||||
|
||||
/**
|
||||
* A taglet should implement this interface if it supports the inheritDoc
|
||||
* A taglet should implement this interface if it supports an {@code @inheritDoc}
|
||||
* tag or is automatically inherited if it is missing.
|
||||
*
|
||||
* <p><b>This is NOT part of any supported API.
|
||||
@ -43,8 +43,8 @@ public interface InheritableTaglet extends Taglet {
|
||||
* object, set its values with the appropriate information to inherit
|
||||
* documentation.
|
||||
*
|
||||
* @param input the input for documentation search.
|
||||
* @param output the output for documentation search.
|
||||
* @param input the input for documentation search
|
||||
* @param output the output for documentation search
|
||||
*/
|
||||
void inherit(DocFinder.Input input, DocFinder.Output output);
|
||||
}
|
||||
|
@ -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
|
||||
@ -40,7 +40,7 @@ import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
|
||||
import jdk.javadoc.internal.doclets.toolkit.util.Utils;
|
||||
|
||||
/**
|
||||
* A simple single argument custom tag.
|
||||
* A custom single-argument tag.
|
||||
*
|
||||
* <p><b>This is NOT part of any supported API.
|
||||
* If you write code that depends on this, you do so at your own risk.
|
||||
@ -57,8 +57,8 @@ public class SimpleTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
|
||||
/**
|
||||
* Whether or not the taglet should generate output.
|
||||
* Standard tags like at-author, at-since, at-version can be disabled
|
||||
* by command-line options; custom tags created with -tag can be
|
||||
* Standard tags like {@code @author}, {@code @since}, {@code @version} can
|
||||
* be disabled by command-line options; custom tags created with -tag can be
|
||||
* disabled with an X in the defining string.
|
||||
*/
|
||||
protected final boolean enabled;
|
||||
@ -71,7 +71,7 @@ public class SimpleTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
* @param locations the possible locations that this tag can appear in
|
||||
* The string can contain 'p' for package, 't' for type,
|
||||
* 'm' for method, 'c' for constructor and 'f' for field.
|
||||
* See {@linbk #getLocations(String) getLocations} for the
|
||||
* See {@link #getLocations(String) getLocations} for the
|
||||
* complete list.
|
||||
*/
|
||||
public SimpleTaglet(String tagName, String header, String locations) {
|
||||
@ -83,18 +83,17 @@ public class SimpleTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
*
|
||||
* @param tagKind the kind of this tag
|
||||
* @param header the header to output
|
||||
* @param locations the possible locations that this tag can appear in.
|
||||
* @param locations the possible locations that this tag can appear in
|
||||
*/
|
||||
public SimpleTaglet(DocTree.Kind tagKind, String header, Set<Location> locations) {
|
||||
this(tagKind, header, locations, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a {@code SimpleTaglet}.
|
||||
*
|
||||
* @param tagName the name of this tag
|
||||
* @param header the header to output.
|
||||
* @param header the header to output
|
||||
* @param locations the possible locations that this tag can appear in
|
||||
*/
|
||||
public SimpleTaglet(String tagName, String header, Set<Location> locations) {
|
||||
@ -105,7 +104,7 @@ public class SimpleTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
* Constructs a {@code SimpleTaglet}.
|
||||
*
|
||||
* @param tagName the name of this tag
|
||||
* @param header the header to output.
|
||||
* @param header the header to output
|
||||
* @param locations the possible locations that this tag can appear in
|
||||
*/
|
||||
public SimpleTaglet(String tagName, String header, Set<Location> locations, boolean enabled) {
|
||||
@ -118,7 +117,7 @@ public class SimpleTaglet extends BaseTaglet implements InheritableTaglet {
|
||||
* Constructs a {@code SimpleTaglet}.
|
||||
*
|
||||
* @param tagKind the kind of this tag
|
||||
* @param header the header to output.
|
||||
* @param header the header to output
|
||||
* @param locations the possible locations that this tag can appear in
|
||||
*/
|
||||
public SimpleTaglet(DocTree.Kind tagKind, String header, Set<Location> locations, boolean enabled) {
|
||||
|
@ -38,89 +38,80 @@ import jdk.javadoc.internal.doclets.toolkit.Content;
|
||||
|
||||
public interface Taglet {
|
||||
/**
|
||||
* Returns the set of allowed locations for block tags
|
||||
* handled by this taglet.
|
||||
* Returns the set of allowed locations for a block tag handled by this taglet.
|
||||
*
|
||||
* @return the set of allowable locations
|
||||
*/
|
||||
Set<Location> getAllowedLocations();
|
||||
|
||||
/**
|
||||
* Return true if this <code>Taglet</code>
|
||||
* is used in field documentation.
|
||||
* @return true if this <code>Taglet</code>
|
||||
* is used in field documentation and false
|
||||
* otherwise.
|
||||
* Indicates whether this {@code Taglet} can be used in field documentation.
|
||||
*
|
||||
* @return {@code true} if this {@code Taglet} can be used in field documentation
|
||||
* and {@code false} otherwise
|
||||
*/
|
||||
boolean inField();
|
||||
|
||||
/**
|
||||
* Return true if this <code>Taglet</code>
|
||||
* is used in constructor documentation.
|
||||
* @return true if this <code>Taglet</code>
|
||||
* is used in constructor documentation and false
|
||||
* otherwise.
|
||||
* Indicates whether this {@code Taglet} can be used in constructor documentation.
|
||||
*
|
||||
* @return {@code true} if this {@code Taglet} can be used in constructor documentation
|
||||
* and {@code false} otherwise
|
||||
*/
|
||||
boolean inConstructor();
|
||||
|
||||
/**
|
||||
* Return true if this <code>Taglet</code>
|
||||
* is used in method documentation.
|
||||
* @return true if this <code>Taglet</code>
|
||||
* is used in method documentation and false
|
||||
* otherwise.
|
||||
* Indicates whether this {@code Taglet} can be used in method documentation.
|
||||
*
|
||||
* @return {@code true} if this {@code Taglet} can be used in method documentation
|
||||
* and {@code false} otherwise
|
||||
*/
|
||||
boolean inMethod();
|
||||
|
||||
/**
|
||||
* Return true if this <code>Taglet</code>
|
||||
* is used in overview documentation.
|
||||
* @return true if this <code>Taglet</code>
|
||||
* is used in method documentation and false
|
||||
* otherwise.
|
||||
* Indicates whether this {@code Taglet} can be used in overview documentation.
|
||||
*
|
||||
* @return {@code true} if this {@code Taglet} can be used in overview documentation
|
||||
* and {@code false} otherwise
|
||||
*/
|
||||
boolean inOverview();
|
||||
|
||||
/**
|
||||
* Return true if this <code>Taglet</code>
|
||||
* is used in module documentation.
|
||||
* @return true if this <code>Taglet</code>
|
||||
* is used in module documentation and false
|
||||
* otherwise.
|
||||
* Indicates whether this {@code Taglet} can be used in module documentation.
|
||||
*
|
||||
* @return {@code true} if this {@code Taglet} can be used in module documentation
|
||||
* and {@code false} otherwise
|
||||
*/
|
||||
boolean inModule();
|
||||
|
||||
/**
|
||||
* Return true if this <code>Taglet</code>
|
||||
* is used in package documentation.
|
||||
* @return true if this <code>Taglet</code>
|
||||
* is used in package documentation and false
|
||||
* otherwise.
|
||||
* Indicates whether this {@code Taglet} can be used in package documentation.
|
||||
*
|
||||
* @return {@code true} if this {@code Taglet} can be used in package documentation
|
||||
* and {@code false} otherwise
|
||||
*/
|
||||
boolean inPackage();
|
||||
|
||||
/**
|
||||
* Return true if this <code>Taglet</code>
|
||||
* is used in type documentation (classes or
|
||||
* interfaces).
|
||||
* @return true if this <code>Taglet</code>
|
||||
* is used in type documentation and false
|
||||
* otherwise.
|
||||
* Indicates whether this {@code Taglet} can be used in type documentation (classes or interfaces).
|
||||
*
|
||||
* @return {@code true} if this {@code Taglet} can be used in type documentation
|
||||
* and {@code false} otherwise
|
||||
*/
|
||||
boolean inType();
|
||||
|
||||
/**
|
||||
* Return true if this <code>Taglet</code>
|
||||
* is an inline tag. Return false otherwise.
|
||||
* @return true if this <code>Taglet</code>
|
||||
* is an inline tag and false otherwise.
|
||||
* Indicates whether this {@code Taglet} represents an inline tag.
|
||||
*
|
||||
* @return {@code true} if this {@code Taglet} represents an inline tag
|
||||
* and {@code false} otherwise
|
||||
*/
|
||||
boolean isInlineTag();
|
||||
|
||||
/**
|
||||
* Indicates whether this taglet supports block tags.
|
||||
* Indicates whether this {@code Taglet} represents a block tag.
|
||||
*
|
||||
* @return true if this taglet supports block tags
|
||||
* @return {@code true} if this {@code Taglet} represents a block tag
|
||||
* @implSpec This implementation returns the inverse
|
||||
* result to {@code isInlineTag}.
|
||||
*/
|
||||
@ -129,8 +120,8 @@ public interface Taglet {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the name of this custom tag.
|
||||
* @return the name of this custom tag.
|
||||
* Returns the name of this tag.
|
||||
* @return the name of this tag
|
||||
*/
|
||||
String getName();
|
||||
|
||||
@ -148,8 +139,8 @@ public interface Taglet {
|
||||
UnsupportedTagletOperationException;
|
||||
|
||||
/**
|
||||
* Returns the content to be included in the generated output for all
|
||||
* instances of tags handled by this taglet.
|
||||
* Returns the content to be included in the generated output for
|
||||
* instances of a tag handled by this taglet.
|
||||
*
|
||||
* @param element the element for the enclosing doc comment
|
||||
* @param writer the taglet-writer used in this doclet
|
||||
|
@ -131,8 +131,8 @@ public class TagletManager {
|
||||
|
||||
/**
|
||||
* Keep track of standard tags in lowercase to compare for better
|
||||
* error messages when a tag like @docRoot is mistakenly spelled
|
||||
* lowercase @docroot.
|
||||
* error messages when a tag like {@code @docRoot} is mistakenly spelled
|
||||
* lowercase {@code @docroot}.
|
||||
*/
|
||||
private final Set<String> standardTagsLowercase;
|
||||
|
||||
@ -154,22 +154,22 @@ public class TagletManager {
|
||||
private final Set<String> unseenCustomTags;
|
||||
|
||||
/**
|
||||
* True if we do not want to use @since tags.
|
||||
* True if we do not want to use {@code @since} tags.
|
||||
*/
|
||||
private final boolean nosince;
|
||||
|
||||
/**
|
||||
* True if we want to use @version tags.
|
||||
* True if we want to use {@code @version} tags.
|
||||
*/
|
||||
private final boolean showversion;
|
||||
|
||||
/**
|
||||
* True if we want to use @author tags.
|
||||
* True if we want to use {@code @author} tags.
|
||||
*/
|
||||
private final boolean showauthor;
|
||||
|
||||
/**
|
||||
* True if we want to use JavaFX-related tags (@defaultValue, @treatAsPrivate).
|
||||
* True if we want to use JavaFX-related tags ({@code @defaultValue}, {@code @treatAsPrivate}).
|
||||
*/
|
||||
private final boolean javafx;
|
||||
|
||||
@ -207,30 +207,15 @@ public class TagletManager {
|
||||
initStandardTaglets();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new {@code Taglet}. This is used to add a Taglet from within
|
||||
* a Doclet. No message is printed to indicate that the Taglet is properly
|
||||
* registered because these Taglets are typically added for every execution of the
|
||||
* Doclet. We don't want to see this type of error message every time.
|
||||
* @param customTag the new {@code Taglet} to add.
|
||||
*/
|
||||
public void addCustomTag(Taglet customTag) {
|
||||
if (customTag != null) {
|
||||
String name = customTag.getName();
|
||||
allTaglets.remove(name);
|
||||
allTaglets.put(name, customTag);
|
||||
checkTagName(name);
|
||||
}
|
||||
}
|
||||
|
||||
public Set<String> getAllTagletNames() {
|
||||
return allTaglets.keySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the location TAGLET_PATH which is used to locate the custom taglets.
|
||||
* @param fileManager the file manager to load classes and resources.
|
||||
* @throws IOException if an error occurs while setting the location.
|
||||
*
|
||||
* @param fileManager the file manager to load classes and resources
|
||||
* @throws IOException if an error occurs while setting the location
|
||||
*/
|
||||
public void initTagletPath(JavaFileManager fileManager) throws IOException {
|
||||
if (fileManager instanceof StandardJavaFileManager) {
|
||||
@ -250,10 +235,12 @@ public class TagletManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new {@code Taglet}. Print a message to indicate whether or not
|
||||
* the Taglet was registered properly.
|
||||
* @param classname the name of the class representing the custom tag.
|
||||
* @param fileManager the file manager to load classes and resources.
|
||||
* Adds a new {@code Taglet}.
|
||||
*
|
||||
* Prints a message to indicate whether or not the Taglet was registered properly.
|
||||
*
|
||||
* @param classname the name of the class representing the custom tag
|
||||
* @param fileManager the file manager to load classes and resources
|
||||
*/
|
||||
public void addCustomTag(String classname, JavaFileManager fileManager) {
|
||||
try {
|
||||
@ -270,9 +257,10 @@ public class TagletManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads taglets from a taglet path using service loader.
|
||||
* @param fileManager the file manager to load the taglets.
|
||||
* @throws IOException if an error occurs while getting the service loader.
|
||||
* Loads taglets from a taglet path using the service loader.
|
||||
*
|
||||
* @param fileManager the file manager to load the taglets
|
||||
* @throws IOException if an error occurs while getting the service loader
|
||||
*/
|
||||
public void loadTaglets(JavaFileManager fileManager) throws IOException {
|
||||
Iterable<? extends File> location = ((StandardJavaFileManager) fileManager).getLocation(TAGLET_PATH);
|
||||
@ -286,8 +274,11 @@ public class TagletManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the {@code Taglet}. Prints a message if a {@code Taglet} got registered properly.
|
||||
* @param instance the {@code Taglet} instance.
|
||||
* Registers the {@code Taglet}.
|
||||
*
|
||||
* Prints a message if the {@code Taglet} got registered properly.
|
||||
*
|
||||
* @param instance the {@code Taglet} instance
|
||||
*/
|
||||
private void registerTaglet(jdk.javadoc.doclet.Taglet instance) {
|
||||
instance.init(docEnv, doclet);
|
||||
@ -297,15 +288,16 @@ public class TagletManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new {@code SimpleTaglet}. If this tag already exists
|
||||
* and the header passed as an argument is null, move tag to the back of the
|
||||
* list. If this tag already exists and the header passed as an argument is
|
||||
* not null, overwrite previous tag with new one. Otherwise, add new
|
||||
* SimpleTaglet to list.
|
||||
* Add a new {@code SimpleTaglet}.
|
||||
*
|
||||
* If this tag already exists and the header passed as an argument is {@code null},
|
||||
* move tag to the back of the list. If this tag already exists and the
|
||||
* header passed as an argument is not {@code null}, overwrite previous tag
|
||||
* with the new one. Otherwise, add a new SimpleTaglet to the list.
|
||||
*
|
||||
* @param tagName the name of this tag
|
||||
* @param header the header to output.
|
||||
* @param locations the possible locations that this tag
|
||||
* can appear in.
|
||||
* @param header the header to output
|
||||
* @param locations the possible locations that this tag can appear in
|
||||
*/
|
||||
public void addNewSimpleCustomTag(String tagName, String header, String locations) {
|
||||
if (tagName == null || locations == null) {
|
||||
@ -342,7 +334,7 @@ public class TagletManager {
|
||||
/**
|
||||
* Given a name of a seen custom tag, remove it from the set of unseen
|
||||
* custom tags.
|
||||
* @param name the name of the seen custom tag.
|
||||
* @param name the name of the seen custom tag
|
||||
*/
|
||||
void seenCustomTag(String name) {
|
||||
unseenCustomTags.remove(name);
|
||||
@ -350,9 +342,10 @@ public class TagletManager {
|
||||
|
||||
/**
|
||||
* Given a series of {@code DocTree}s, check for spelling mistakes.
|
||||
*
|
||||
* @param element the tags holder
|
||||
* @param trees the trees containing the comments
|
||||
* @param inlineTrees true if the trees are inline and false otherwise.
|
||||
* @param inlineTrees true if the trees are inline and false otherwise
|
||||
*/
|
||||
@SuppressWarnings("preview")
|
||||
public void checkTags(Element element, Iterable<? extends DocTree> trees, boolean inlineTrees) {
|
||||
@ -453,9 +446,10 @@ public class TagletManager {
|
||||
/**
|
||||
* Given the taglet, the tag and the type of documentation that the tag
|
||||
* was found in, print a tag misuse warning.
|
||||
* @param taglet the taglet representing the misused tag.
|
||||
* @param tag the misused tag.
|
||||
* @param holderType the type of documentation that the misused tag was found in.
|
||||
*
|
||||
* @param taglet the taglet representing the misused tag
|
||||
* @param tag the misused tag
|
||||
* @param holderType the type of documentation that the misused tag was found in
|
||||
*/
|
||||
private void printTagMisuseWarn(CommentHelper ch, Taglet taglet, DocTree tag, String holderType) {
|
||||
Set<String> locationsSet = new LinkedHashSet<>();
|
||||
@ -526,7 +520,7 @@ public class TagletManager {
|
||||
*
|
||||
* @param e the element to get custom tags for
|
||||
* @return the array of {@code Taglet}s that can
|
||||
* appear in the given element.
|
||||
* appear in the given element
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
public List<Taglet> getBlockTaglets(Element e) {
|
||||
@ -716,11 +710,9 @@ public class TagletManager {
|
||||
|
||||
/**
|
||||
* Given the name of a tag, return the corresponding taglet.
|
||||
* Return null if the tag is unknown.
|
||||
*
|
||||
* @param name the name of the taglet to retrieve.
|
||||
* @return return the corresponding taglet. Return null if the tag is
|
||||
* unknown.
|
||||
* @param name the name of the taglet to retrieve
|
||||
* @return the corresponding taglet or {@code null} if the tag is unknown
|
||||
*/
|
||||
Taglet getTaglet(String name) {
|
||||
if (name.indexOf("@") == 0) {
|
||||
@ -756,6 +748,6 @@ public class TagletManager {
|
||||
}
|
||||
|
||||
private String format(boolean b, String s) {
|
||||
return b ? s : s.replaceAll(".", "."); // replace all with "."
|
||||
return b ? s : ".".repeat(s.length()); // "replace" all with "."
|
||||
}
|
||||
}
|
||||
|
@ -40,14 +40,14 @@ import static jdk.javadoc.doclet.Taglet.Location.*;
|
||||
|
||||
/**
|
||||
* A taglet wrapper, allows the public taglet {@link jdk.javadoc.doclet.Taglet}
|
||||
* wrapped into an internal Taglet representation.
|
||||
* wrapped into an internal {@code Taglet} representation.
|
||||
*
|
||||
* <p><b>This is NOT part of any supported API.
|
||||
* If you write code that depends on this, you do so at your own risk.
|
||||
* This code and its internal interfaces are subject to change or
|
||||
* deletion without notice.</b>
|
||||
*/
|
||||
public class UserTaglet implements Taglet {
|
||||
public final class UserTaglet implements Taglet {
|
||||
|
||||
private final jdk.javadoc.doclet.Taglet userTaglet;
|
||||
|
||||
@ -95,11 +95,6 @@ public class UserTaglet implements Taglet {
|
||||
return userTaglet.getAllowedLocations().contains(TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this <code>Taglet</code> is an inline tag.
|
||||
*
|
||||
* @return true if this <code>Taglet</code> is an inline tag and false otherwise.
|
||||
*/
|
||||
@Override
|
||||
public boolean isInlineTag() {
|
||||
return userTaglet.isInlineTag();
|
||||
@ -116,7 +111,7 @@ public class UserTaglet implements Taglet {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer){
|
||||
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;
|
||||
|
@ -875,7 +875,7 @@ public class Utils {
|
||||
/*
|
||||
* We should not instantiate if (i) there's no contextual type declaration, (ii) the declaration
|
||||
* to which the member belongs to is the same as the one under consideration, (iii) if the
|
||||
* delcaration to which the member belongs to is not generic.
|
||||
* declaration to which the member belongs to is not generic.
|
||||
*/
|
||||
private boolean shouldInstantiate(TypeElement site, Element e) {
|
||||
return site != null &&
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 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
|
||||
@ -28,10 +28,8 @@ package jdk.javadoc.internal.doclets.toolkit.util;
|
||||
import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
|
||||
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.type.TypeMirror;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* This class manages the visible member table for each type element.
|
||||
|
@ -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
|
||||
@ -34,7 +34,6 @@ import com.sun.tools.javac.tree.JCTree.*;
|
||||
import com.sun.tools.javac.tree.TreeInfo;
|
||||
import com.sun.tools.javac.util.Context;
|
||||
import com.sun.tools.javac.util.List;
|
||||
import com.sun.tools.javac.util.Names;
|
||||
|
||||
import static com.sun.tools.javac.code.Flags.*;
|
||||
import static com.sun.tools.javac.code.Kinds.Kind.*;
|
||||
|
Loading…
x
Reference in New Issue
Block a user