APIdia Launch Partner
Top Description Methods
com.sun.tools.javac.tree

public Interface DocCommentTable

Known Direct Implementers
com.sun.tools.javac.parser.LazyDocCommentTable
Imports
javax.lang.model.util.Elements.DocCommentKind, com.sun.source.doctree.DocCommentTree, .ErroneousTree, com.sun.tools.javac.parser.Tokens.Comment

A table giving the doc comment, if any, for any tree node.

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.

Method Summary

Modifier and TypeMethod and Description
public Tokens.Comment
getComment(JCTree tree)

Returns the Comment token containing the doc comment, if any, for a tree node.

public Elements.DocCommentKind
getCommentKind(JCTree tree)

Returns the kind of the doc comment, if any, for a tree node.

public String
getCommentText(JCTree tree)

Returns the plain text of the doc comment, if any, for a tree node.

public DocCommentTree
getCommentTree(JCTree tree)

Returns the parsed form of the doc comment as a DocTree.

public boolean
hasComment(JCTree tree)

Checks if a tree node has a corresponding doc comment.

public void
putComment(JCTree tree, Tokens.Comment c)

Sets the Comment to be associated with a tree node.

Method Detail

getCommentback to summary
public Tokens.Comment getComment(JCTree tree)

Returns the Comment token containing the doc comment, if any, for a tree node.

getCommentKindback to summary
public Elements.DocCommentKind getCommentKind(JCTree tree)

Returns the kind of the doc comment, if any, for a tree node.

getCommentTextback to summary
public String getCommentText(JCTree tree)

Returns the plain text of the doc comment, if any, for a tree node.

getCommentTreeback to summary
public DocCommentTree getCommentTree(JCTree tree)

Returns the parsed form of the doc comment as a DocTree. If any errors are detected during parsing, they will be reported via ErroneousTree nodes within the resulting tree.

hasCommentback to summary
public boolean hasComment(JCTree tree)

Checks if a tree node has a corresponding doc comment.

putCommentback to summary
public void putComment(JCTree tree, Tokens.Comment c)

Sets the Comment to be associated with a tree node.