Constructor and Description |
---|
DocTrees() |
Modifier and Type | Method and Description |
---|---|
abstract DocCommentTree |
getDocCommentTree(TreePath path)
Gets the doc comment tree, if any, for the Tree node identified by a given TreePath.
|
abstract Element |
getElement(DocTreePath path)
Gets the language model element referred to by the leaf node of the given
DocTreePath , or null if unknown. |
abstract DocSourcePositions |
getSourcePositions()
Gets a utility object for obtaining source positions.
|
static DocTrees |
instance(JavaCompiler.CompilationTask task)
Gets a DocTrees object for a given CompilationTask.
|
static DocTrees |
instance(ProcessingEnvironment env)
Gets a DocTrees object for a given ProcessingEnvironment.
|
abstract void |
printMessage(Diagnostic.Kind kind,
CharSequence msg,
DocTree t,
DocCommentTree c,
CompilationUnitTree root)
Prints a message of the specified kind at the location of the
tree within the provided compilation unit
|
getDocComment, getElement, getLub, getOriginalType, getPath, getPath, getPath, getPath, getScope, getTree, getTree, getTree, getTree, getTree, getTypeMirror, isAccessible, isAccessible, printMessage
public static DocTrees instance(JavaCompiler.CompilationTask task)
task
- the compilation task for which to get the Trees objectIllegalArgumentException
- if the task does not support the Trees API.public static DocTrees instance(ProcessingEnvironment env)
env
- the processing environment for which to get the Trees objectIllegalArgumentException
- if the env does not support the Trees API.public abstract DocCommentTree getDocCommentTree(TreePath path)
public abstract Element getElement(DocTreePath path)
DocTreePath
, or null if unknown.public abstract DocSourcePositions getSourcePositions()
Trees
getSourcePositions
in class Trees
public abstract void printMessage(Diagnostic.Kind kind, CharSequence msg, DocTree t, DocCommentTree c, CompilationUnitTree root)
kind
- the kind of messagemsg
- the message, or an empty string if nonet
- the tree to use as a position hintroot
- the compilation unit that contains tree
Copyright © 2005, 2022, Oracle and/or its affiliates. All rights reserved.