public class ImportReferencesCollector
extends org.eclipse.jdt.internal.corext.dom.GenericVisitor
Modifier and Type | Method and Description |
---|---|
static void |
collect(ASTNode node,
IJavaProject project,
Region rangeLimit,
boolean skipMethodBodies,
Collection<SimpleName> resultingTypeImports,
Collection<SimpleName> resultingStaticImports)
Collect import statements from an AST node.
|
static void |
collect(ASTNode node,
IJavaProject project,
Region rangeLimit,
Collection<SimpleName> resultingTypeImports,
Collection<SimpleName> resultingStaticImports)
Collect import statements from an AST node.
|
boolean |
visit(BreakStatement node)
Visits the given type-specific AST node.
|
boolean |
visit(ClassInstanceCreation node)
Visits the given type-specific AST node.
|
boolean |
visit(ContinueStatement node)
Visits the given type-specific AST node.
|
boolean |
visit(CreationReference node)
Visits the given type-specific AST node.
|
boolean |
visit(ExpressionMethodReference node)
Visits the given type-specific AST node.
|
boolean |
visit(FieldAccess node)
Visits the given type-specific AST node.
|
boolean |
visit(ImportDeclaration node)
Visits the given type-specific AST node.
|
boolean |
visit(LabeledStatement node)
Visits the given type-specific AST node.
|
boolean |
visit(MarkerAnnotation node)
Visits the given type-specific AST node.
|
boolean |
visit(MemberRef node)
Visits the given type-specific AST node.
|
boolean |
visit(MethodDeclaration node)
Visits the given type-specific AST node.
|
boolean |
visit(MethodInvocation node)
Visits the given type-specific AST node.
|
boolean |
visit(MethodRef node)
Visits the given type-specific AST node.
|
boolean |
visit(MethodRefParameter node)
Visits the given type-specific AST node.
|
boolean |
visit(NameQualifiedType node)
Visits the given type-specific AST node.
|
boolean |
visit(NormalAnnotation node)
Visits the given type-specific AST node.
|
boolean |
visit(PackageDeclaration node)
Visits the given type-specific AST node.
|
boolean |
visit(ProvidesDirective node)
Visits the given type-specific AST node.
|
boolean |
visit(QualifiedName node)
Visits the given type-specific AST node.
|
boolean |
visit(QualifiedType node)
Visits the given type-specific AST node.
|
boolean |
visit(SimpleName node)
Visits the given type-specific AST node.
|
boolean |
visit(SimpleType node)
Visits the given type-specific AST node.
|
boolean |
visit(SingleMemberAnnotation node)
Visits the given type-specific AST node.
|
boolean |
visit(SuperConstructorInvocation node)
Visits the given type-specific AST node.
|
boolean |
visit(SuperFieldAccess node)
Visits the given type-specific AST node.
|
boolean |
visit(SuperMethodReference node)
Visits the given type-specific AST node.
|
boolean |
visit(TagElement node)
Visits the given type-specific AST node.
|
boolean |
visit(ThisExpression node)
Visits the given type-specific AST node.
|
boolean |
visit(TypeDeclaration node)
Visits the given type-specific AST node.
|
boolean |
visit(TypeMethodReference node)
Visits the given type-specific AST node.
|
boolean |
visit(UsesDirective node)
Visits the given type-specific AST node.
|
protected boolean |
visitNode(ASTNode node) |
endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisitNode, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
postVisit, preVisit, preVisit2
public static void collect(ASTNode node, IJavaProject project, Region rangeLimit, Collection<SimpleName> resultingTypeImports, Collection<SimpleName> resultingStaticImports)
node
- The AST nodeproject
- The Java projectrangeLimit
- The range within the source fileresultingTypeImports
- The collected import referencesresultingStaticImports
- The collected static importspublic static void collect(ASTNode node, IJavaProject project, Region rangeLimit, boolean skipMethodBodies, Collection<SimpleName> resultingTypeImports, Collection<SimpleName> resultingStaticImports)
node
- The AST nodeproject
- The Java projectrangeLimit
- The range within the source fileskipMethodBodies
- If set, do not visit method bodiesresultingTypeImports
- The collected import referencesresultingStaticImports
- The collected static importsprotected boolean visitNode(ASTNode node)
visitNode
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
public boolean visit(SimpleType node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(NameQualifiedType node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(QualifiedType node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(QualifiedName node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(ImportDeclaration node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(PackageDeclaration node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(LabeledStatement node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(ContinueStatement node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(BreakStatement node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(ThisExpression node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(SuperFieldAccess node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(ClassInstanceCreation node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(MethodInvocation node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(CreationReference node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may re-implement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(ExpressionMethodReference node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may re-implement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(SuperMethodReference node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(TypeMethodReference node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(UsesDirective node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may re-implement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(ProvidesDirective node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may re-implement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(SuperConstructorInvocation node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(FieldAccess node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(SimpleName node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(MarkerAnnotation node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(NormalAnnotation node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(SingleMemberAnnotation node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(TypeDeclaration node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(MethodDeclaration node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(TagElement node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(MemberRef node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(MethodRef node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skippedpublic boolean visit(MethodRefParameter node)
ASTVisitor
The default implementation does nothing and return true. Subclasses may reimplement.
visit
in class org.eclipse.jdt.internal.corext.dom.GenericVisitor
node
- the node to visittrue
if the children of this node should be
visited, and false
if the children of this node should
be skipped
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.