Uses of Class
org.eclipse.jdt.core.dom.ASTNode
Package
Description
This package contains miscellaneous APIs related to Java annotation processing.
The Java DOM/AST is the set of classes that model the source code of a Java program
as a structured document.
The Java DOM/AST rewrite is the set of classes that are used to make changes to an existing DOM/AST tree.
Application programming interface for the JDT core manipulation plug-in class.
-
Uses of ASTNode in org.eclipse.jdt.apt.core.util
Modifier and TypeMethodDescriptionvoid
EclipseMessager.printError
(ASTNode node, String msg) Print an error message on the given AST node.void
EclipseMessager.printNotice
(ASTNode node, String msg) Print a notice on the given AST node.void
EclipseMessager.printWarning
(ASTNode node, String msg) Print a warning on the given AST node. -
Uses of ASTNode in org.eclipse.jdt.core.dom
Modifier and TypeClassDescriptionclass
AST node for a tag within a doc comment.class
AST node for a text element within a doc comment.class
Abstract subclass for type declaration, enum declaration, and annotation type declaration AST node types.class
Abstract base class of AST nodes that represent an annotatable type (added in JLS8 API).class
Abstract base class of AST nodes that represent annotations.class
Annotation type declaration AST node type (added in JLS3 API).class
Annotation type member declaration AST node type (added in JLS3 API).class
Anonymous class declaration AST node type.class
Array access expression AST node type.class
Array creation expression AST node type.class
Array initializer AST node type.class
Type node for an array type.class
Assert statement AST node type.class
Assignment expression AST node type.class
Block statement AST node type.final class
Block comment AST node type.class
Abstract base class of all AST nodes that represent body declarations that may appear in the body of some kind of class or interface declaration, including anonymous class declarations, enumeration declarations, and enumeration constant declarations.class
Boolean literal node.class
Break statement AST node type.class
Case Default Literal Pattern node.class
Cast expression AST node type.class
Catch clause AST node type.class
Character literal nodes.class
Class instance creation expression AST node type.class
Abstract base class for all AST nodes that represent comments.class
Java compilation unit AST node type.class
Conditional expression AST node type.class
Alternate constructor invocation statement AST node type.class
Continue statement AST node type.class
Creation reference expression AST node type (added in JLS8 API).class
AST node for an array dimension (added in JLS8 API).class
Do statement AST node type.class
Null statement AST node type.class
Enhanced For statement AST node type (added in JLS3 API).class
Enhanced For statement AST node type with record pattern(added in JLS20 API).class
Enumeration constant declaration AST node type (added in JLS3 API).class
Enum declaration AST node type (added in JLS3 API).class
Exports directive AST node type (added in JLS9 API).class
Abstract base class of AST nodes that represent expressions.class
Expression method reference AST node type (added in JLS8 API).class
Expression statement AST node type.class
Field access expression AST node type.class
Field declaration node type.class
For statement AST node type.class
GuardedPattern pattern AST node type.class
If statement AST node type.class
Import declaration AST node type.class
Infix expression AST node type.class
Static or instance initializer AST node type.class
Instanceof expression AST node type.class
Type node for an intersection type in a cast expression (added in JLS8 API).class
AST node for a Javadoc-style doc comment.class
JavaDocRegion pattern AST node type.final class
AST node for a text element within a doc comment.class
Labeled statement AST node type.class
Lambda expression AST node type (added in JLS8 API).final class
End-of-line comment AST node type.final class
Marker annotation node (added in JLS3 API).class
AST node for a member reference within a doc comment (Javadoc
).class
Member value pair node (added in JLS3 API).class
Method declaration AST node type.class
Method invocation expression AST node type.class
AST node for a method or constructor reference within a doc comment (Javadoc
).class
Abstract base class of all AST node types that represent a method reference expression (added in JLS8 API).class
AST node for a parameter within a method reference (MethodRef
).final class
Modifier node.class
Module declaration AST node type representing the module descriptor file (added in JLS9 API).class
Abstract base class of AST nodes that represent module directives (added in JLS9 API).final class
Module Modifier node - represents the modifiers for the requires directive in module declaration (added in JLS9 API).class
Abstract base class of AST nodes that represent exports and opens directives (added in JLS9 API).class
AST node for a module qualified name.class
Abstract base class for all AST nodes that represent names.class
Node for a name-qualified type (added in JLS8 API).final class
Normal annotation node (added in JLS3 API).class
Null literal node.class
Null Pattern node.class
Number literal nodes.class
Opens directive AST node type (added in JLS9 API).class
Package declaration AST node type.class
Type node for a parameterized type (added in JLS3 API).class
Parenthesized expression AST node type.class
Abstract base class of AST nodes that represent patterns.class
PatternInstanceof expression AST node type.class
Postfix expression AST node type.class
Prefix expression AST node type.class
Primitive type nodes.class
Provides directive AST node type (added in JLS9 API).class
AST node for a qualified name.class
Type node for a qualified type (added in JLS3 API).class
Record declaration AST node type (added in JLS16 API).class
TypePattern pattern AST node type.class
Requires directive AST node type (added in JLS9 API).class
Return statement AST node type.class
AST node for a simple name.class
Type node for a named class type, a named interface type, or a type variable.final class
Single member annotation node (added in JLS3 API).class
Single variable declaration AST node type.class
Abstract base class of AST nodes that represent statements.class
String fragment node is similar to StringLiteral and TextBlock, but does not include the delimiters.class
String literal nodes.class
StringTemplateComponent AST node type is a combination of a single embedded expression followed by aStringFragment
.class
StringTemplateExpression AST node type.class
Super constructor invocation statement AST node type.class
Simple or qualified "super" field access expression AST node type.class
Simple or qualified "super" method invocation expression AST node type.class
Super method reference AST node type (added in JLS8 API).class
Switch case AST node type.class
Switch expression AST node type (added in JEP 325).class
Switch statement AST node type.class
Synchronized statement AST node type.final class
AST node for a tag within a doc comment.class
TagProperty pattern AST node type.class
TextBolck AST node type.final class
AST node for a text element within a doc comment.class
Simple or qualified "this" AST node type.class
Throw statement AST node type.class
Try statement AST node type.class
Abstract base class of all type reference AST node types.class
Type declaration AST node type.class
Local type declaration statement AST node type.class
Type literal AST node type.class
Type method reference expression AST node type (added in JLS8 API).class
Type parameter declaration node (added in JLS3 API).class
TypePattern pattern AST node type.class
Type node for an union type (added in JLS4 API).class
Uses directive AST node type (added in JLS9 API).class
Abstract base class of all AST node types that declare a single variable.class
Local variable declaration expression AST node type.class
Variable declaration fragment AST node type, used in field declarations, local variable declarations,ForStatement
initializers, andLambdaExpression
parameters.class
Local variable declaration statement AST node type.class
While statement AST node type.class
Type node for a wildcard type (added in JLS3 API).class
Yield statement AST node type.Modifier and TypeMethodDescriptionprotected ASTNode
ModulePackageAccess.cloneHelper
(AST target, ModulePackageAccess result) static ASTNode
ASTNode.copySubtree
(AST target, ASTNode node) Returns a deep copy of the subtree of AST nodes rooted at the given node.ASTParser.createAST
(org.eclipse.core.runtime.IProgressMonitor monitor) Creates an abstract syntax tree.AST.createInstance
(int nodeType) Creates an unparented node of the given node type.AST.createInstance
(Class nodeClass) Creates an unparented node of the given node class (non-abstract subclass ofASTNode
).CompilationUnit.findDeclaringNode
(String key) Finds the corresponding AST node in the given compilation unit from which the binding with the given key originated.CompilationUnit.findDeclaringNode
(IBinding binding) Finds the corresponding AST node in the given compilation unit from which the given binding originated.final ASTNode
Comment.getAlternateRoot()
Returns the root AST node that this comment occurs within, ornull
if none (or not recorded).LambdaExpression.getBody()
Returns the body of this lambda expression.NodeFinder.getCoveredNode()
If the AST contains nodes whose range is equal to the selection, returns the innermost of those nodes.NodeFinder.getCoveringNode()
Returns the innermost node that fully contains the selection.TagProperty.getNodeValue()
Returns the node value of this tag property.final ASTNode
ASTNode.getParent()
Returns this node's parent node, ornull
if this is the root node.final ASTNode
ASTNode.getRoot()
Returns the root node at or above this node; returns this node if it is a root.static ASTNode
Maps a selection to an ASTNode, where the selection is defined using a start and a length.static ASTNode
Maps a selection to an ASTNode, where the selection is given by a start and a length.static ASTNode
NodeFinder.perform
(ASTNode root, ISourceRange range) Maps a selection to an ASTNode, where the selection is defined using a source range.Modifier and TypeMethodDescriptionstatic ASTNode
ASTNode.copySubtree
(AST target, ASTNode node) Returns a deep copy of the subtree of AST nodes rooted at the given node.int
CompilationUnit.firstLeadingCommentIndex
(ASTNode node) Return the index in the whole comments listCompilationUnit.getCommentList()
of the first leading comments associated with the given node.int
CompilationUnit.getExtendedLength
(ASTNode node) Returns the extended source length of the given node.int
CompilationUnit.getExtendedStartPosition
(ASTNode node) Returns the extended start position of the given node.int
CompilationUnit.lastTrailingCommentIndex
(ASTNode node) Return the index in the whole comments listCompilationUnit.getCommentList()
of the last trailing comments associated with the given node.static ASTNode
Maps a selection to an ASTNode, where the selection is defined using a start and a length.static ASTNode
Maps a selection to an ASTNode, where the selection is given by a start and a length.static ASTNode
NodeFinder.perform
(ASTNode root, ISourceRange range) Maps a selection to an ASTNode, where the selection is defined using a source range.void
Visits the given AST node following the type-specific visit (afterendVisit
).void
Visits the given AST node prior to the type-specific visit (beforevisit
).boolean
Visits the given AST node prior to the type-specific visit (beforevisit
).final void
Comment.setAlternateRoot
(ASTNode root) Returns the root AST node that this comment occurs within, ornull
if none (or not recorded).void
Sets the body of this lambda expression.void
TagProperty.setNodeValue
(ASTNode value) Sets the node value of this tag property.TagElement.tagRegionsContainingTextElement
(ASTNode docElem) Returns the list of non dummy JavaDocRegions containing this ASTNode and IDocElement.TagElement.tagRegionsStartingAtTextElement
(ASTNode docElem) Returns the list of non dummy JavaDocRegions starting at this ASTNode and IDocElement.ModifierConstructorDescriptionNodeFinder
(ASTNode root, int start, int length) Instantiate a new node finder using the given root node, the given start and the given length. -
Uses of ASTNode in org.eclipse.jdt.core.dom.rewrite
Modifier and TypeMethodDescriptionfinal ASTNode
ASTRewrite.createCopyTarget
(ASTNode node) Creates and returns a placeholder node for a true copy of the given node.final ASTNode
ListRewrite.createCopyTarget
(ASTNode first, ASTNode last) Creates and returns a placeholder node for a true copy of a range of nodes of the current list.final ASTNode
ASTRewrite.createGroupNode
(ASTNode[] targetNodes) Creates and returns a node that represents a sequence of nodes.final ASTNode
ASTRewrite.createMoveTarget
(ASTNode node) Creates and returns a placeholder node for the new locations of the given node.final ASTNode
ListRewrite.createMoveTarget
(ASTNode first, ASTNode last) Creates and returns a placeholder node for a move of a range of nodes of the current list.final ASTNode
ListRewrite.createMoveTarget
(ASTNode first, ASTNode last, ASTNode replacingNode, org.eclipse.text.edits.TextEditGroup editGroup) Creates and returns a placeholder node for a move of a range of nodes of the current list.final ASTNode
ASTRewrite.createStringPlaceholder
(String code, int nodeType) Creates and returns a placeholder node for a source string that is to be inserted into the output document at the position corresponding to the placeholder.ListRewrite.getParent()
Returns the parent of the list for which this list rewriter was created.Modifier and TypeMethodDescriptionTargetSourceRangeComputer.computeSourceRange
(ASTNode node) Returns the target source range of the given node.final ASTNode
ASTRewrite.createCopyTarget
(ASTNode node) Creates and returns a placeholder node for a true copy of the given node.final ASTNode
ListRewrite.createCopyTarget
(ASTNode first, ASTNode last) Creates and returns a placeholder node for a true copy of a range of nodes of the current list.final ASTNode
ASTRewrite.createGroupNode
(ASTNode[] targetNodes) Creates and returns a node that represents a sequence of nodes.final ASTNode
ASTRewrite.createMoveTarget
(ASTNode node) Creates and returns a placeholder node for the new locations of the given node.final ASTNode
ListRewrite.createMoveTarget
(ASTNode first, ASTNode last) Creates and returns a placeholder node for a move of a range of nodes of the current list.final ASTNode
ListRewrite.createMoveTarget
(ASTNode first, ASTNode last, ASTNode replacingNode, org.eclipse.text.edits.TextEditGroup editGroup) Creates and returns a placeholder node for a move of a range of nodes of the current list.ASTRewrite.get
(ASTNode node, StructuralPropertyDescriptor property) Returns the value of the given property as managed by this rewriter.final ListRewrite
ASTRewrite.getListRewrite
(ASTNode node, ChildListPropertyDescriptor property) Creates and returns a new rewriter for describing modifications to the given list property of the given node.void
ListRewrite.insertAfter
(ASTNode node, ASTNode previousElement, org.eclipse.text.edits.TextEditGroup editGroup) Inserts the given node into the list after the given element.void
Inserts the given node into the list at the given index.void
ListRewrite.insertBefore
(ASTNode node, ASTNode nextElement, org.eclipse.text.edits.TextEditGroup editGroup) Inserts the given node into the list before the given element.void
ListRewrite.insertFirst
(ASTNode node, org.eclipse.text.edits.TextEditGroup editGroup) Inserts the given node into the list at the start of the list.void
ListRewrite.insertLast
(ASTNode node, org.eclipse.text.edits.TextEditGroup editGroup) Inserts the given node into the list at the end of the list.final void
Removes the given node from its parent in this rewriter.void
Removes the given node from its parent's list property in the rewriter.final void
ASTRewrite.replace
(ASTNode node, ASTNode replacement, org.eclipse.text.edits.TextEditGroup editGroup) Replaces the given node in this rewriter.void
ListRewrite.replace
(ASTNode node, ASTNode replacement, org.eclipse.text.edits.TextEditGroup editGroup) Replaces the given node from its parent's list property in the rewriter.final void
ASTRewrite.set
(ASTNode node, StructuralPropertyDescriptor property, Object value, org.eclipse.text.edits.TextEditGroup editGroup) Sets the given property of the given node.final ITrackedNodePosition
Returns an object that tracks the source range of the given node across the rewrite to its AST. -
Uses of ASTNode in org.eclipse.jdt.core.manipulation
Modifier and TypeMethodDescriptionstatic void
ImportReferencesCollector.collect
(ASTNode node, IJavaProject project, org.eclipse.jface.text.Region rangeLimit, boolean skipMethodBodies, Collection<SimpleName> resultingTypeImports, Collection<SimpleName> resultingStaticImports) Collect import statements from an AST node.static void
ImportReferencesCollector.collect
(ASTNode node, IJavaProject project, org.eclipse.jface.text.Region rangeLimit, Collection<SimpleName> resultingTypeImports, Collection<SimpleName> resultingStaticImports) Collect import statements from an AST node.protected boolean