Uses of Class
org.eclipse.jdt.core.dom.ASTNode
-
Packages that use ASTNode Package Description org.eclipse.jdt.apt.core.util This package contains miscellaneous APIs related to Java annotation processing.org.eclipse.jdt.core.dom The Java DOM/AST is the set of classes that model the source code of a Java program as a structured document.org.eclipse.jdt.core.dom.rewrite The Java DOM/AST rewrite is the set of classes that are used to make changes to an existing DOM/AST tree.org.eclipse.jdt.core.manipulation Application programming interface for the JDT core manipulation plug-in class.org.eclipse.jdt.ui.text.java Application programming interfaces for interaction with the Eclipse Java User Interface. -
-
Uses of ASTNode in org.eclipse.jdt.apt.core.util
Methods in org.eclipse.jdt.apt.core.util with parameters of type ASTNode Modifier and Type Method Description voidEclipseMessager. 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.dom Modifier and Type Class Description classAbstractTypeDeclarationAbstract subclass for type declaration, enum declaration, and annotation type declaration AST node types.classAnnotatableTypeAbstract base class of AST nodes that represent an annotatable type (added in JLS8 API).classAnnotationAbstract base class of AST nodes that represent annotations.classAnnotationTypeDeclarationAnnotation type declaration AST node type (added in JLS3 API).classAnnotationTypeMemberDeclarationAnnotation type member declaration AST node type (added in JLS3 API).classAnonymousClassDeclarationAnonymous class declaration AST node type.classArrayAccessArray access expression AST node type.classArrayCreationArray creation expression AST node type.classArrayInitializerArray initializer AST node type.classArrayTypeType node for an array type.classAssertStatementAssert statement AST node type.classAssignmentAssignment expression AST node type.classBlockBlock statement AST node type.classBlockCommentBlock comment AST node type.classBodyDeclarationAbstract 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.classBooleanLiteralBoolean literal node.classBreakStatementBreak statement AST node type.classCastExpressionCast expression AST node type.classCatchClauseCatch clause AST node type.classCharacterLiteralCharacter literal nodes.classClassInstanceCreationClass instance creation expression AST node type.classCommentAbstract base class for all AST nodes that represent comments.classCompilationUnitJava compilation unit AST node type.classConditionalExpressionConditional expression AST node type.classConstructorInvocationAlternate constructor invocation statement AST node type.classContinueStatementContinue statement AST node type.classCreationReferenceCreation reference expression AST node type (added in JLS8 API).classDimensionAST node for an array dimension (added in JLS8 API).classDoStatementDo statement AST node type.classEmptyStatementNull statement AST node type.classEnhancedForStatementEnhanced For statement AST node type (added in JLS3 API).classEnumConstantDeclarationEnumeration constant declaration AST node type (added in JLS3 API).classEnumDeclarationEnum declaration AST node type (added in JLS3 API).classExportsDirectiveExports directive AST node type (added in JLS9 API).classExpressionAbstract base class of AST nodes that represent expressions.classExpressionMethodReferenceExpression method reference AST node type (added in JLS8 API).classExpressionStatementExpression statement AST node type.classFieldAccessField access expression AST node type.classFieldDeclarationField declaration node type.classForStatementFor statement AST node type.classIfStatementIf statement AST node type.classImportDeclarationImport declaration AST node type.classInfixExpressionInfix expression AST node type.classInitializerStatic or instance initializer AST node type.classInstanceofExpressionInstanceof expression AST node type.classIntersectionTypeType node for an intersection type in a cast expression (added in JLS8 API).classJavadocAST node for a Javadoc-style doc comment.classLabeledStatementLabeled statement AST node type.classLambdaExpressionLambda expression AST node type (added in JLS8 API).classLineCommentEnd-of-line comment AST node type.classMarkerAnnotationMarker annotation node (added in JLS3 API).classMemberRefAST node for a member reference within a doc comment (Javadoc).classMemberValuePairMember value pair node (added in JLS3 API).classMethodDeclarationMethod declaration AST node type.classMethodInvocationMethod invocation expression AST node type.classMethodRefAST node for a method or constructor reference within a doc comment (Javadoc).classMethodReferenceAbstract base class of all AST node types that represent a method reference expression (added in JLS8 API).classMethodRefParameterAST node for a parameter within a method reference (MethodRef).classModifierModifier node.classModuleDeclarationModule declaration AST node type representing the module descriptor file (added in JLS9 API).classModuleDirectiveAbstract base class of AST nodes that represent module directives (added in JLS9 API).classModuleModifierModule Modifier node - represents the modifiers for the requires directive in module declaration (added in JLS9 API).classModulePackageAccessAbstract base class of AST nodes that represent exports and opens directives (added in JLS9 API).classNameAbstract base class for all AST nodes that represent names.classNameQualifiedTypeNode for a name-qualified type (added in JLS8 API).classNormalAnnotationNormal annotation node (added in JLS3 API).classNullLiteralNull literal node.classNumberLiteralNumber literal nodes.classOpensDirectiveOpens directive AST node type (added in JLS9 API).classPackageDeclarationPackage declaration AST node type.classParameterizedTypeType node for a parameterized type (added in JLS3 API).classParenthesizedExpressionParenthesized expression AST node type.classPostfixExpressionPostfix expression AST node type.classPrefixExpressionPrefix expression AST node type.classPrimitiveTypePrimitive type nodes.classProvidesDirectiveProvides directive AST node type (added in JLS9 API).classQualifiedNameAST node for a qualified name.classQualifiedTypeType node for a qualified type (added in JLS3 API).classRecordDeclarationRecord declaration AST node type (added in JLS14 API).classRequiresDirectiveRequires directive AST node type (added in JLS9 API).classReturnStatementReturn statement AST node type.classSimpleNameAST node for a simple name.classSimpleTypeType node for a named class type, a named interface type, or a type variable.classSingleMemberAnnotationSingle member annotation node (added in JLS3 API).classSingleVariableDeclarationSingle variable declaration AST node type.classStatementAbstract base class of AST nodes that represent statements.classStringLiteralString literal nodes.classSuperConstructorInvocationSuper constructor invocation statement AST node type.classSuperFieldAccessSimple or qualified "super" field access expression AST node type.classSuperMethodInvocationSimple or qualified "super" method invocation expression AST node type.classSuperMethodReferenceSuper method reference AST node type (added in JLS8 API).classSwitchCaseSwitch case AST node type.classSwitchExpressionSwitch expression AST node type (added in JEP 325).classSwitchStatementSwitch statement AST node type.classSynchronizedStatementSynchronized statement AST node type.classTagElementAST node for a tag within a doc comment.classTextBlockTextBolck AST node type.classTextElementAST node for a text element within a doc comment.classThisExpressionSimple or qualified "this" AST node type.classThrowStatementThrow statement AST node type.classTryStatementTry statement AST node type.classTypeAbstract base class of all type reference AST node types.classTypeDeclarationType declaration AST node type.classTypeDeclarationStatementLocal type declaration statement AST node type.classTypeLiteralType literal AST node type.classTypeMethodReferenceType method reference expression AST node type (added in JLS8 API).classTypeParameterType parameter declaration node (added in JLS3 API).classUnionTypeType node for an union type (added in JLS4 API).classUsesDirectiveUses directive AST node type (added in JLS9 API).classVariableDeclarationAbstract base class of all AST node types that declare a single variable.classVariableDeclarationExpressionLocal variable declaration expression AST node type.classVariableDeclarationFragmentVariable declaration fragment AST node type, used in field declarations, local variable declarations,ForStatementinitializers, andLambdaExpressionparameters.classVariableDeclarationStatementLocal variable declaration statement AST node type.classWhileStatementWhile statement AST node type.classWildcardTypeType node for a wildcard type (added in JLS3 API).classYieldStatementYield statement AST node type.Methods in org.eclipse.jdt.core.dom that return ASTNode Modifier and Type Method Description protected 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.ASTNodeASTParser. createAST(IProgressMonitor monitor)Creates an abstract syntax tree.ASTNodeAST. createInstance(int nodeType)Creates an unparented node of the given node type.ASTNodeAST. createInstance(Class nodeClass)Creates an unparented node of the given node class (non-abstract subclass ofASTNode).ASTNodeCompilationUnit. findDeclaringNode(String key)Finds the corresponding AST node in the given compilation unit from which the binding with the given key originated.ASTNodeCompilationUnit. findDeclaringNode(IBinding binding)Finds the corresponding AST node in the given compilation unit from which the given binding originated.ASTNodeComment. getAlternateRoot()Returns the root AST node that this comment occurs within, ornullif none (or not recorded).ASTNodeLambdaExpression. getBody()Returns the body of this lambda expression.ASTNodeNodeFinder. getCoveredNode()If the AST contains nodes whose range is equal to the selection, returns the innermost of those nodes.ASTNodeNodeFinder. getCoveringNode()Returns the innermost node that fully contains the selection.ASTNodeASTNode. getParent()Returns this node's parent node, ornullif this is the root node.ASTNodeASTNode. getRoot()Returns the root node at or above this node; returns this node if it is a root.static ASTNodeNodeFinder. perform(ASTNode root, int start, int length)Maps a selection to an ASTNode, where the selection is defined using a start and a length.static ASTNodeNodeFinder. perform(ASTNode root, int start, int length, ITypeRoot source)Maps 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 ASTNode Modifier and Type Method Description static 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 ASTNodeNodeFinder. perform(ASTNode root, int start, int length)Maps a selection to an ASTNode, where the selection is defined using a start and a length.static ASTNodeNodeFinder. perform(ASTNode root, int start, int length, ITypeRoot source)Maps 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.voidASTVisitor. postVisit(ASTNode node)Visits the given AST node following the type-specific visit (afterendVisit).voidASTVisitor. preVisit(ASTNode node)Visits the given AST node prior to the type-specific visit (beforevisit).booleanASTVisitor. preVisit2(ASTNode node)Visits the given AST node prior to the type-specific visit (beforevisit).voidComment. setAlternateRoot(ASTNode root)Returns the root AST node that this comment occurs within, ornullif none (or not recorded).voidLambdaExpression. setBody(ASTNode body)Sets the body of this lambda expression.Constructors in org.eclipse.jdt.core.dom with parameters of type ASTNode Constructor Description NodeFinder(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 ASTNode Modifier and Type Method Description ASTNodeASTRewrite. createCopyTarget(ASTNode node)Creates and returns a placeholder node for a true copy of the given node.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.ASTNodeASTRewrite. createGroupNode(ASTNode[] targetNodes)Creates and returns a node that represents a sequence of nodes.ASTNodeASTRewrite. createMoveTarget(ASTNode node)Creates and returns a placeholder node for the new locations of the given node.ASTNodeListRewrite. createMoveTarget(ASTNode first, ASTNode last)Creates and returns a placeholder node for a move of a range of nodes of the current list.ASTNodeListRewrite. createMoveTarget(ASTNode first, ASTNode last, ASTNode replacingNode, TextEditGroup editGroup)Creates and returns a placeholder node for a move of a range of nodes of the current list.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.ASTNodeListRewrite. 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 ASTNode Modifier and Type Method Description TargetSourceRangeComputer.SourceRangeTargetSourceRangeComputer. computeSourceRange(ASTNode node)Returns the target source range of the given node.ASTNodeASTRewrite. createCopyTarget(ASTNode node)Creates and returns a placeholder node for a true copy of the given node.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.ASTNodeASTRewrite. createGroupNode(ASTNode[] targetNodes)Creates and returns a node that represents a sequence of nodes.ASTNodeASTRewrite. createMoveTarget(ASTNode node)Creates and returns a placeholder node for the new locations of the given node.ASTNodeListRewrite. createMoveTarget(ASTNode first, ASTNode last)Creates and returns a placeholder node for a move of a range of nodes of the current list.ASTNodeListRewrite. createMoveTarget(ASTNode first, ASTNode last, ASTNode replacingNode, TextEditGroup editGroup)Creates and returns a placeholder node for a move of a range of nodes of the current list.ObjectASTRewrite. get(ASTNode node, StructuralPropertyDescriptor property)Returns the value of the given property as managed by this rewriter.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, TextEditGroup editGroup)Inserts the given node into the list after the given element.voidListRewrite. insertAt(ASTNode node, int index, TextEditGroup editGroup)Inserts the given node into the list at the given index.voidListRewrite. insertBefore(ASTNode node, ASTNode nextElement, TextEditGroup editGroup)Inserts the given node into the list before the given element.voidListRewrite. insertFirst(ASTNode node, TextEditGroup editGroup)Inserts the given node into the list at the start of the list.voidListRewrite. insertLast(ASTNode node, TextEditGroup editGroup)Inserts the given node into the list at the end of the list.voidASTRewrite. remove(ASTNode node, TextEditGroup editGroup)Removes the given node from its parent in this rewriter.voidListRewrite. remove(ASTNode node, TextEditGroup editGroup)Removes the given node from its parent's list property in the rewriter.voidASTRewrite. replace(ASTNode node, ASTNode replacement, TextEditGroup editGroup)Replaces the given node in this rewriter.voidListRewrite. replace(ASTNode node, ASTNode replacement, TextEditGroup editGroup)Replaces the given node from its parent's list property in the rewriter.voidASTRewrite. set(ASTNode node, StructuralPropertyDescriptor property, Object value, TextEditGroup editGroup)Sets the given property of the given node.ITrackedNodePositionASTRewrite. track(ASTNode node)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
Methods in org.eclipse.jdt.core.manipulation with parameters of type ASTNode Modifier and Type Method Description static voidImportReferencesCollector. collect(ASTNode node, IJavaProject project, Region rangeLimit, boolean skipMethodBodies, Collection<SimpleName> resultingTypeImports, Collection<SimpleName> resultingStaticImports)Collect import statements from an AST node.static voidImportReferencesCollector. collect(ASTNode node, IJavaProject project, Region rangeLimit, Collection<SimpleName> resultingTypeImports, Collection<SimpleName> resultingStaticImports)Collect import statements from an AST node.protected booleanImportReferencesCollector. visitNode(ASTNode node) -
Uses of ASTNode in org.eclipse.jdt.ui.text.java
Methods in org.eclipse.jdt.ui.text.java that return ASTNode Modifier and Type Method Description ASTNodeIInvocationContext. getCoveredNode()If the AST contains nodes whose range is equal to the selection, returns the innermost of those nodes.ASTNodeIProblemLocation. getCoveredNode(CompilationUnit astRoot)Convenience method to evaluate the AST node covered by this problem.ASTNodeIInvocationContext. getCoveringNode()Returns the innermost node that fully contains the selection.ASTNodeIProblemLocation. getCoveringNode(CompilationUnit astRoot)Convenience method to evaluate the AST node covering this problem.
-