APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.javadoc.internal.doclets.toolkit.util

public Class CommentHelper

extends Object
Class Inheritance
Imports
com.sun.source.doctree.AuthorTree, .BlockTagTree, .CommentTree, .DeprecatedTree, .DocCommentTree, .DocTree, .EscapeTree, .IdentifierTree, .InheritDocTree, .InlineTagTree, .LinkTree, .LiteralTree, .ParamTree, .ProvidesTree, .RawTextTree, .ReferenceTree, .ReturnTree, .SeeTree, .SerialDataTree, .SerialFieldTree, .SerialTree, .SinceTree, .SpecTree, .TextTree, .ThrowsTree, .UnknownBlockTagTree, .UsesTree, .ValueTree, .VersionTree, com.sun.source.util.DocTreePath, .DocTrees, .SimpleDocTreeVisitor, .TreePath, jdk.javadoc.internal.doclets.toolkit.BaseConfiguration, jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Result, javax.lang.model.element.Element, .ElementKind, .ExecutableElement, .ModuleElement, .PackageElement, .TypeElement, javax.lang.model.type.TypeKind, .TypeMirror, java.util.List, .Optional

A utility class.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final BaseConfiguration
public final DocCommentTree
public final Element
public final TreePath

Constructor Summary

AccessConstructor and Description
public
CommentHelper(BaseConfiguration
the configuration
configuration
,
Element
the element for which this is a doc comment
element
,
TreePath
the path for the element
path
,
DocCommentTree
the doc comment
dcTree
)

Creates a utility class to encapsulate the contextual information for a doc comment tree.

Method Summary

Modifier and TypeMethod and Description
public List<? extends DocTree>
public List<? extends DocTree>
public DocTreePath
pack-priv Element
public Element
public List<? extends DocTree>
private DocTreePath
public IdentifierTree
public String
public List<? extends DocTree>
public TypeElement
public Element
public String
public Element
public Element
public ModuleElement
public String
public PackageElement
public String

Returns:

the normalized signature from a ReferenceTree
getReferencedSignature
(DocTree dtree)

Returns the normalized signature from a ReferenceTree.

public TypeMirror
public TypeElement
public String
public List<? extends DocTree>
public TypeMirror
public ReferenceTree
private static String
public String

Returns:

a string representation.
toString
()

Overrides java.lang.Object.toString.

For debugging purposes only.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

configurationback to summary
private final BaseConfiguration configuration
dcTreeback to summary
public final DocCommentTree dcTree
elementback to summary
public final Element element
pathback to summary
public final TreePath path

Constructor Detail

CommentHelperback to summary
public CommentHelper(BaseConfiguration configuration, Element element, TreePath path, DocCommentTree dcTree)

Creates a utility class to encapsulate the contextual information for a doc comment tree.

Parameters
configuration:BaseConfiguration

the configuration

element:Element

the element for which this is a doc comment

path:TreePath

the path for the element

dcTree:DocCommentTree

the doc comment

Method Detail

getBodyback to summary
public List<? extends DocTree> getBody(DocTree dtree)
getDescriptionback to summary
public List<? extends DocTree> getDescription(DocTree dtree)
getDocTreePathback to summary
public DocTreePath getDocTreePath(DocTree dtree)
getElementback to summary
pack-priv Element getElement(ReferenceTree rtree)
getExceptionback to summary
public Element getException(ThrowsTree tt)
getFirstSentenceTreesback to summary
public List<? extends DocTree> getFirstSentenceTrees(List<? extends DocTree> body)
getInheritedDocTreePathback to summary
private DocTreePath getInheritedDocTreePath(DocTree dtree)
getNameback to summary
public IdentifierTree getName(DocTree dtree)
getParameterNameback to summary
public String getParameterName(ParamTree p)
getReferenceback to summary
public List<? extends DocTree> getReference(DocTree dtree)
getReferencedClassback to summary
public TypeElement getReferencedClass(Element e)
getReferencedElementback to summary
public Element getReferencedElement(DocTree dtree)
getReferencedFragmentback to summary
public String getReferencedFragment(String signature)
getReferencedMemberback to summary
public Element getReferencedMember(DocTree dtree)
getReferencedMemberback to summary
public Element getReferencedMember(Element e)
getReferencedModuleback to summary
public ModuleElement getReferencedModule(Element e)
getReferencedModuleNameback to summary
public String getReferencedModuleName(String signature)
getReferencedPackageback to summary
public PackageElement getReferencedPackage(Element e)
getReferencedSignatureback to summary
public String getReferencedSignature(DocTree dtree)

Returns the normalized signature from a ReferenceTree.

Returns:String

the normalized signature from a ReferenceTree

getReferencedTypeback to summary
public TypeMirror getReferencedType(DocTree dtree)
getServiceTypeback to summary
public TypeElement getServiceType(DocTree dtree)
getTagNameback to summary
public String getTagName(DocTree dtree)
getTagsback to summary
public List<? extends DocTree> getTags(DocTree dtree)
getTypeback to summary
public TypeMirror getType(ReferenceTree rtree)
getTypeback to summary
public ReferenceTree getType(DocTree dtree)
normalizeSignatureback to summary
private static String normalizeSignature(String sig)
Annotations
@SuppressWarnings:fallthrough
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

For debugging purposes only. Do not rely on this for other things.

Returns:String

a string representation.

Annotations
@Override
jdk.javadoc.internal.doclets.toolkit.util back to summary

private Class CommentHelper.ReferenceDocTreeVisitor<R>

extends SimpleDocTreeVisitor<R, Void>
Class Inheritance

Field Summary

Inherited from com.sun.source.util.SimpleDocTreeVisitor:
DEFAULT_VALUE

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected R
defaultAction(DocTree node, Void p)

Overrides com.sun.source.util.SimpleDocTreeVisitor.defaultAction.

The default action, used by all visit methods that are not overridden.

public R
public R
public R
public R
public R
public R
Inherited from com.sun.source.util.SimpleDocTreeVisitor:
visitvisitvisitAttributevisitAuthorvisitCommentvisitDeprecatedvisitDocCommentvisitDocRootvisitDocTypevisitEndElementvisitEntityvisitErroneousvisitEscapevisitHiddenvisitIdentifiervisitIndexvisitLiteralvisitOthervisitParamvisitRawTextvisitReferencevisitReturnvisitSerialvisitSerialDatavisitSincevisitSnippetvisitSpecvisitStartElementvisitSummaryvisitSystemPropertyvisitTextvisitThrowsvisitUnknownBlockTagvisitUnknownInlineTagvisitVersion

Constructor Detail

ReferenceDocTreeVisitorback to summary
private ReferenceDocTreeVisitor()

Method Detail

defaultActionback to summary
protected R defaultAction(DocTree node, Void p)

Overrides com.sun.source.util.SimpleDocTreeVisitor.defaultAction.

Doc from com.sun.source.util.SimpleDocTreeVisitor.defaultAction.

The default action, used by all visit methods that are not overridden.

Annotations
@Override
visitInheritDocback to summary
public R visitInheritDoc(InheritDocTree node, Void p)

Overrides com.sun.source.util.SimpleDocTreeVisitor.visitInheritDoc.

Implements com.sun.source.doctree.DocTreeVisitor.visitInheritDoc.

Doc from com.sun.source.util.SimpleDocTreeVisitor.visitInheritDoc.

Visits an InheritDocTree node.

Annotations
@Override
visitProvidesback to summary
public R visitProvides(ProvidesTree node, Void p)

Overrides com.sun.source.util.SimpleDocTreeVisitor.visitProvides.

Overrides default com.sun.source.doctree.DocTreeVisitor.visitProvides.

Doc from com.sun.source.util.SimpleDocTreeVisitor.visitProvides.

Visits a ProvidesTree node.

Annotations
@Override
visitSeeback to summary
public R visitSee(SeeTree node, Void p)

Overrides com.sun.source.util.SimpleDocTreeVisitor.visitSee.

Implements com.sun.source.doctree.DocTreeVisitor.visitSee.

Doc from com.sun.source.util.SimpleDocTreeVisitor.visitSee.

Visits a SeeTree node.

Annotations
@Override
visitSerialFieldback to summary
public R visitSerialField(SerialFieldTree node, Void p)

Overrides com.sun.source.util.SimpleDocTreeVisitor.visitSerialField.

Implements com.sun.source.doctree.DocTreeVisitor.visitSerialField.

Doc from com.sun.source.util.SimpleDocTreeVisitor.visitSerialField.

Visits a SerialFieldTree node.

Annotations
@Override
visitUsesback to summary
public R visitUses(UsesTree node, Void p)

Overrides com.sun.source.util.SimpleDocTreeVisitor.visitUses.

Overrides default com.sun.source.doctree.DocTreeVisitor.visitUses.

Doc from com.sun.source.util.SimpleDocTreeVisitor.visitUses.

Visits a UsesTree node.

Annotations
@Override
visitValueback to summary
public R visitValue(ValueTree node, Void p)

Overrides com.sun.source.util.SimpleDocTreeVisitor.visitValue.

Implements com.sun.source.doctree.DocTreeVisitor.visitValue.

Doc from com.sun.source.util.SimpleDocTreeVisitor.visitValue.

Visits a ValueTree node.

Annotations
@Override