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, visitpostVisit, preVisit, preVisit2public 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.GenericVisitorpublic boolean visit(SimpleType node)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may re-implement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may re-implement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may re-implement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may re-implement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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)
ASTVisitorThe default implementation does nothing and return true. Subclasses may reimplement.
visit in class org.eclipse.jdt.internal.corext.dom.GenericVisitornode - 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.