Uses of Class
org.eclipse.jdt.core.dom.ASTNode
Packages that use 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
Methods in org.eclipse.jdt.apt.core.util with parameters of type ASTNodeModifier and TypeMethodDescriptionvoidEclipseMessager.printError(ASTNode node, String msg) Print an error message on the given AST node.voidEclipseMessager.printNotice(ASTNode node, String msg) Print a notice on the given AST node.voidEclipseMessager.printWarning(ASTNode node, String msg) Print a warning on the given AST node. -
Uses of ASTNode in org.eclipse.jdt.core.dom
Subclasses of ASTNode in org.eclipse.jdt.core.domModifier and TypeClassDescriptionclassAST node for a tag within a doc comment.classAST node for a text element within a doc comment.classAbstract subclass for type declaration, enum declaration, and annotation type declaration AST node types.classAbstract base class of AST nodes that represent an annotatable type (added in JLS8 API).classAbstract base class of AST nodes that represent annotations.classAnnotation type declaration AST node type (added in JLS3 API).classAnnotation type member declaration AST node type (added in JLS3 API).classAnonymous class declaration AST node type.classArray access expression AST node type.classArray creation expression AST node type.classArray initializer AST node type.classType node for an array type.classAssert statement AST node type.classAssignment expression AST node type.classBlock statement AST node type.final classBlock comment AST node type.classAbstract 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.classBoolean literal node.classBreak statement AST node type.classCase Default Literal Pattern node.classCast expression AST node type.classCatch clause AST node type.classCharacter literal nodes.classClass instance creation expression AST node type.classAbstract base class for all AST nodes that represent comments.classJava compilation unit AST node type.classConditional expression AST node type.classAlternate constructor invocation statement AST node type.classContinue statement AST node type.classCreation reference expression AST node type (added in JLS8 API).classAST node for an array dimension (added in JLS8 API).classDo statement AST node type.classEitherOrMultiPattern AST node type.classNull statement AST node type.classEnhanced For statement AST node type (added in JLS3 API).classEnumeration constant declaration AST node type (added in JLS3 API).classEnum declaration AST node type (added in JLS3 API).classExports directive AST node type (added in JLS9 API).classAbstract base class of AST nodes that represent expressions.classExpression method reference AST node type (added in JLS8 API).classExpression statement AST node type.classField access expression AST node type.classField declaration node type.classFor statement AST node type.classGuardedPattern pattern AST node type.classIf statement AST node type.classclassImport declaration AST node type.classInfix expression AST node type.classStatic or instance initializer AST node type.classInstanceof expression AST node type.classType node for an intersection type in a cast expression (added in JLS8 API).classAST node for a Javadoc-style doc comment.classJavaDocRegion pattern AST node type.final classAST node for a text element within a doc comment.classLabeled statement AST node type.classLambda expression AST node type (added in JLS8 API).final classEnd-of-line comment AST node type.final classMarker annotation node (added in JLS3 API).classAST node for a member reference within a doc comment (Javadoc).classMember value pair node (added in JLS3 API).classMethod declaration AST node type.classMethod invocation expression AST node type.classAST node for a method or constructor reference within a doc comment (Javadoc).classAbstract base class of all AST node types that represent a method reference expression (added in JLS8 API).classAST node for a parameter within a method reference (MethodRef).final classModifier node.classModule declaration AST node type representing the module descriptor file (added in JLS9 API).classAbstract base class of AST nodes that represent module directives (added in JLS9 API).final classModule Modifier node - represents the modifiers for the requires directive in module declaration (added in JLS9 API).classAbstract base class of AST nodes that represent exports and opens directives (added in JLS9 API).classAST node for a module qualified name.classAbstract base class for all AST nodes that represent names.classNode for a name-qualified type (added in JLS8 API).final classNormal annotation node (added in JLS3 API).classNull literal node.classNull Pattern node.classNumber literal nodes.classOpens directive AST node type (added in JLS9 API).classPackage declaration AST node type.classType node for a parameterized type (added in JLS3 API).classParenthesized expression AST node type.classAbstract base class of AST nodes that represent patterns.classPatternInstanceof expression AST node type.classPostfix expression AST node type.classPrefix expression AST node type.classPrimitive type nodes.classProvides directive AST node type (added in JLS9 API).classAST node for a qualified name.classType node for a qualified type (added in JLS3 API).classRecord declaration AST node type (added in JLS16 API).classTypePattern pattern AST node type.classRequires directive AST node type (added in JLS9 API).classReturn statement AST node type.classAST node for a simple name.classType node for a named class type, a named interface type, or a type variable.final classSingle member annotation node (added in JLS3 API).classSingle variable declaration AST node type.classAbstract base class of AST nodes that represent statements.classString literal nodes.classSuper constructor invocation statement AST node type.classSimple or qualified "super" field access expression AST node type.classSimple or qualified "super" method invocation expression AST node type.classSuper method reference AST node type (added in JLS8 API).classSwitch case AST node type.classSwitch expression AST node type (added in JEP 325).classSwitch statement AST node type.classSynchronized statement AST node type.final classAST node for a tag within a doc comment.classTagProperty pattern AST node type.classTextBlock AST node type.final classAST node for a text element within a doc comment.classSimple or qualified "this" AST node type.classThrow statement AST node type.classTry statement AST node type.classAbstract base class of all type reference AST node types.classType declaration AST node type.classLocal type declaration statement AST node type.classType literal AST node type.classType method reference expression AST node type (added in JLS8 API).classType parameter declaration node (added in JLS3 API).classTypePattern pattern AST node type.classType node for an union type (added in JLS4 API).classUses directive AST node type (added in JLS9 API).classAbstract base class of all AST node types that declare a single variable.classLocal variable declaration expression AST node type.classVariable declaration fragment AST node type, used in field declarations, local variable declarations,ForStatementinitializers, andLambdaExpressionparameters.classLocal variable declaration statement AST node type.classWhile statement AST node type.classType node for a wildcard type (added in JLS3 API).classYield statement AST node type.Methods in org.eclipse.jdt.core.dom that return ASTNodeModifier and TypeMethodDescriptionprotected ASTNodeModulePackageAccess.cloneHelper(AST target, ModulePackageAccess result) static ASTNodeASTNode.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 ASTNodeComment.getAlternateRoot()Returns the root AST node that this comment occurs within, ornullif 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 ASTNodeASTNode.getParent()Returns this node's parent node, ornullif this is the root node.final ASTNodeASTNode.getRoot()Returns the root node at or above this node; returns this node if it is a root.static ASTNodeMaps a selection to an ASTNode, where the selection is defined using a start and a length.static ASTNodeMaps a selection to an ASTNode, where the selection is given by a start and a length.static ASTNodeNodeFinder.perform(ASTNode root, ISourceRange range) Maps a selection to an ASTNode, where the selection is defined using a source range.Methods in org.eclipse.jdt.core.dom with parameters of type ASTNodeModifier and TypeMethodDescriptionstatic ASTNodeASTNode.copySubtree(AST target, ASTNode node) Returns a deep copy of the subtree of AST nodes rooted at the given node.intCompilationUnit.firstLeadingCommentIndex(ASTNode node) Return the index in the whole comments listCompilationUnit.getCommentList()of the first leading comments associated with the given node.intCompilationUnit.getExtendedLength(ASTNode node) Returns the extended source length of the given node.intCompilationUnit.getExtendedStartPosition(ASTNode node) Returns the extended start position of the given node.intCompilationUnit.lastTrailingCommentIndex(ASTNode node) Return the index in the whole comments listCompilationUnit.getCommentList()of the last trailing comments associated with the given node.static ASTNodeMaps a selection to an ASTNode, where the selection is defined using a start and a length.static ASTNodeMaps a selection to an ASTNode, where the selection is given by a start and a length.static ASTNodeNodeFinder.perform(ASTNode root, ISourceRange range) Maps a selection to an ASTNode, where the selection is defined using a source range.voidVisits the given AST node following the type-specific visit (afterendVisit).voidVisits the given AST node prior to the type-specific visit (beforevisit).booleanVisits the given AST node prior to the type-specific visit (beforevisit).final voidComment.setAlternateRoot(ASTNode root) Returns the root AST node that this comment occurs within, ornullif none (or not recorded).voidSets the body of this lambda expression.voidTagProperty.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.Constructors in org.eclipse.jdt.core.dom with parameters of type ASTNodeModifierConstructorDescriptionNodeFinder(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
Methods in org.eclipse.jdt.core.dom.rewrite that return ASTNodeModifier and TypeMethodDescriptionfinal ASTNodeASTRewrite.createCopyTarget(ASTNode node) Creates and returns a placeholder node for a true copy of the given node.final ASTNodeListRewrite.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 ASTNodeASTRewrite.createGroupNode(ASTNode[] targetNodes) Creates and returns a node that represents a sequence of nodes.final ASTNodeASTRewrite.createMoveTarget(ASTNode node) Creates and returns a placeholder node for the new locations of the given node.final ASTNodeListRewrite.createMoveTarget(ASTNode first, ASTNode last) Creates and returns a placeholder node for a move of a range of nodes of the current list.final ASTNodeListRewrite.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 ASTNodeASTRewrite.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.Methods in org.eclipse.jdt.core.dom.rewrite with parameters of type ASTNodeModifier and TypeMethodDescriptionTargetSourceRangeComputer.computeSourceRange(ASTNode node) Returns the target source range of the given node.final ASTNodeASTRewrite.createCopyTarget(ASTNode node) Creates and returns a placeholder node for a true copy of the given node.final ASTNodeListRewrite.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 ASTNodeASTRewrite.createGroupNode(ASTNode[] targetNodes) Creates and returns a node that represents a sequence of nodes.final ASTNodeASTRewrite.createMoveTarget(ASTNode node) Creates and returns a placeholder node for the new locations of the given node.final ASTNodeListRewrite.createMoveTarget(ASTNode first, ASTNode last) Creates and returns a placeholder node for a move of a range of nodes of the current list.final ASTNodeListRewrite.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 ListRewriteASTRewrite.getListRewrite(ASTNode node, ChildListPropertyDescriptor property) Creates and returns a new rewriter for describing modifications to the given list property of the given node.voidListRewrite.insertAfter(ASTNode node, ASTNode previousElement, org.eclipse.text.edits.TextEditGroup editGroup) Inserts the given node into the list after the given element.voidInserts the given node into the list at the given index.voidListRewrite.insertBefore(ASTNode node, ASTNode nextElement, org.eclipse.text.edits.TextEditGroup editGroup) Inserts the given node into the list before the given element.voidListRewrite.insertFirst(ASTNode node, org.eclipse.text.edits.TextEditGroup editGroup) Inserts the given node into the list at the start of the list.voidListRewrite.insertLast(ASTNode node, org.eclipse.text.edits.TextEditGroup editGroup) Inserts the given node into the list at the end of the list.final voidRemoves the given node from its parent in this rewriter.voidRemoves the given node from its parent's list property in the rewriter.final voidASTRewrite.replace(ASTNode node, ASTNode replacement, org.eclipse.text.edits.TextEditGroup editGroup) Replaces the given node in this rewriter.voidListRewrite.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 voidASTRewrite.set(ASTNode node, StructuralPropertyDescriptor property, Object value, org.eclipse.text.edits.TextEditGroup editGroup) Sets the given property of the given node.final ITrackedNodePositionReturns 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
Methods in org.eclipse.jdt.core.manipulation with parameters of type ASTNodeModifier and TypeMethodDescriptionstatic voidImportReferencesCollector.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 voidImportReferencesCollector.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