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

public abstract Class DCTree

extends Object
implements DocTree
Class Inheritance
All Implemented Interfaces
com.sun.source.doctree.DocTree
Known Direct Subclasses
com.sun.tools.javac.tree.DCTree.DCEndPosTree, com.sun.tools.javac.tree.DCTree.DCDocComment, com.sun.tools.javac.tree.DCTree.DCBlockTag, com.sun.tools.javac.tree.DCTree.DCAttribute, com.sun.tools.javac.tree.DCTree.DCComment, com.sun.tools.javac.tree.DCTree.DCDocType, com.sun.tools.javac.tree.DCTree.DCEntity, com.sun.tools.javac.tree.DCTree.DCErroneous, com.sun.tools.javac.tree.DCTree.DCEscape, com.sun.tools.javac.tree.DCTree.DCIdentifier, com.sun.tools.javac.tree.DCTree.DCRawText, com.sun.tools.javac.tree.DCTree.DCText
Imports
java.io.IOException, .StringWriter, java.util.List, javax.lang.model.element.Name, javax.lang.model.util.Elements, javax.tools.Diagnostic, .JavaFileObject, com.sun.source.doctree.*, com.sun.source.util.DocTreeScanner, com.sun.tools.javac.parser.Tokens.Comment, com.sun.tools.javac.util.Assert, .DefinedBy, .DefinedBy.Api, .JCDiagnostic

Root class for abstract syntax documentation tree nodes. It provides definitions for specific tree nodes as subclasses nested inside. Apart from the top-level DCDocComment node, generally nodes fall into three groups: Trees are typically wide and shallow, without a significant amount of nesting. Nodes have various associated positions: All values are relative to the beginning of the comment text in which they appear. To convert a value to the position in the enclosing source text, use DCDocComment#getSourcePosition(int).

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public abstract static class
public static class
public static class
public static class
public static class
public static class
public static class
public abstract static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public abstract static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
public int
pos

The position of the first character that is unique to this node.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static JCDiagnostic.DiagnosticPosition

Returns:

a diagnostic position based on the positions in a comment
createDiagnosticPosition
(Tokens.Comment
the enclosing comment
comment
,
int
the start position in the comment
start
,
int
the preferred position in the comment
pref
,
int
the end position in the comment
end
)

Returns a diagnostic position based on the positions in a comment.

public int

Returns:

the end position of the tree node
getEndPosition
()

Returns the end position of the tree node.

private DCTree

Returns:

the last (right-most) child of this node
getLastChild
()

Returns the last (right-most) child of this node.

public int

Returns:

the "preferred" position of this tree node
getPreferredPosition
()

Returns the "preferred" position of this tree node.

public int

Returns:

the start position of this tree node
getStartPosition
()

Returns the start position of this tree node.

public boolean
public static boolean
isBlank(List<? extends DCTree> list)

public JCDiagnostic.DiagnosticPosition

Returns:

a DiagnosticPosition for this node
pos
(DCTree.DCDocComment
the enclosing comment, used to convert comment-based positions to file-based positions
dc
)

Returns a DiagnosticPosition for this node.

public String
toString()

Overrides java.lang.Object.toString.

Convert a tree to a pretty-printed string.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait