本文整理汇总了Java中org.eclipse.jdt.internal.compiler.ASTVisitor.visit方法的典型用法代码示例。如果您正苦于以下问题:Java ASTVisitor.visit方法的具体用法?Java ASTVisitor.visit怎么用?Java ASTVisitor.visit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.internal.compiler.ASTVisitor
的用法示例。
在下文中一共展示了ASTVisitor.visit方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.type != null) {
this.type.traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
示例2: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.expression != null)
this.expression.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
示例3: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (this.referencesTable == null) {
super.traverse(visitor, scope);
} else {
if (visitor.visit(this, scope)) {
int restart;
for (restart = this.arity - 1;
restart >= 0;
restart--) {
if (!visitor.visit(
this.referencesTable[restart], scope)) {
visitor.endVisit(
this.referencesTable[restart], scope);
break;
}
}
restart++;
// restart now points to the deepest BE for which
// visit returned true, if any
if (restart == 0) {
this.referencesTable[0].left.traverse(visitor, scope);
}
for (int i = restart, end = this.arity;
i < end; i++) {
this.referencesTable[i].right.traverse(visitor, scope);
visitor.endVisit(this.referencesTable[i], scope);
}
this.right.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
}
示例4: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
Annotation [] typeAnnotations = this.annotations[0];
for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++)
typeAnnotations[i].traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
示例5: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.bound != null) {
this.bound.traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
示例6: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.expression.traverse(visitor, blockScope);
if (this.statements != null) {
int statementsLength = this.statements.length;
for (int i = 0; i < statementsLength; i++)
this.statements[i].traverse(visitor, this.scope);
}
}
visitor.endVisit(this, blockScope);
}
示例7: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.value != null) {
this.value.traverse(visitor, scope);
}
}
visitor.endVisit(this, scope);
}
示例8: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(
ASTVisitor visitor,
ClassScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.qualification.traverse(visitor, blockScope);
}
visitor.endVisit(this, blockScope);
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:10,代码来源:QualifiedSuperReference.java
示例9: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
if (this.receiver != null) {
this.receiver.traverse(visitor, blockScope);
}
if (this.arguments != null) {
int argumentsLength = this.arguments.length;
for (int i = 0; i < argumentsLength; i++)
this.arguments[i].traverse(visitor, blockScope);
}
}
visitor.endVisit(this, blockScope);
}
示例10: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.lhs.traverse(visitor, blockScope);
int length = this.typeArguments == null ? 0 : this.typeArguments.length;
for (int i = 0; i < length; i++) {
this.typeArguments[i].traverse(visitor, blockScope);
}
}
visitor.endVisit(this, blockScope);
}
示例11: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.condition.traverse(visitor, scope);
this.valueIfTrue.traverse(visitor, scope);
this.valueIfFalse.traverse(visitor, scope);
}
visitor.endVisit(this, scope);
}
示例12: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
示例13: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
示例14: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, CompilationUnitScope scope) {
// annotations are traversed during the compilation unit traversal using a class scope
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
示例15: traverse
import org.eclipse.jdt.internal.compiler.ASTVisitor; //导入方法依赖的package包/类
public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope, boolean skipOnError) {
if (skipOnError && this.ignoreFurtherInvestigation)
return;
try {
if (visitor.visit(this, this.scope)) {
if (this.types != null && isPackageInfo()) {
// resolve synthetic type declaration
final TypeDeclaration syntheticTypeDeclaration = this.types[0];
// resolve javadoc package if any
final MethodScope methodScope = syntheticTypeDeclaration.staticInitializerScope;
// Don't traverse in null scope and invite trouble a la bug 252555.
if (this.javadoc != null && methodScope != null) {
this.javadoc.traverse(visitor, methodScope);
}
// Don't traverse in null scope and invite trouble a la bug 252555.
if (this.currentPackage != null && methodScope != null) {
final Annotation[] annotations = this.currentPackage.annotations;
if (annotations != null) {
int annotationsLength = annotations.length;
for (int i = 0; i < annotationsLength; i++) {
annotations[i].traverse(visitor, methodScope);
}
}
}
}
if (this.currentPackage != null) {
this.currentPackage.traverse(visitor, this.scope);
}
if (this.imports != null) {
int importLength = this.imports.length;
for (int i = 0; i < importLength; i++) {
this.imports[i].traverse(visitor, this.scope);
}
}
if (this.types != null) {
int typesLength = this.types.length;
for (int i = 0; i < typesLength; i++) {
this.types[i].traverse(visitor, this.scope);
}
}
}
visitor.endVisit(this, this.scope);
} catch (AbortCompilationUnit e) {
// ignore
}
}