public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.qualification != null) { this.qualification.traverse(visitor, scope); } if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.arguments != null) { for (int i = 0, argumentLength = this.arguments.length; i < argumentLength; i++) this.arguments[i].traverse(visitor, scope); } } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) { LocalDeclaration[] localDeclarations = this.resources; for (int i = 0, max = localDeclarations.length; i < max; i++) { localDeclarations[i].traverse(visitor, this.scope); } this.tryBlock.traverse(visitor, this.scope); if (this.catchArguments != null) { for (int i = 0, max = this.catchBlocks.length; i < max; i++) { this.catchArguments[i].traverse(visitor, this.scope); this.catchBlocks[i].traverse(visitor, this.scope); } } if (this.finallyBlock != null) this.finallyBlock.traverse(visitor, this.scope); } visitor.endVisit(this, blockScope); }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) { // enum constant scenario this.type.traverse(visitor, scope); } if (this.arguments != null) { for (int i = 0, argumentsLength = this.arguments.length; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { int dimensionsLength = this.dimensions.length; this.type.traverse(visitor, scope); for (int i = 0; i < dimensionsLength; i++) { Annotation [] annotations = this.annotationsOnDimensions == null ? null : this.annotationsOnDimensions[i]; int annotationsLength = annotations == null ? 0 : annotations.length; for (int j = 0; j < annotationsLength; j++) { annotations[j].traverse(visitor, scope); } if (this.dimensions[i] != null) this.dimensions[i].traverse(visitor, scope); } if (this.initializer != null) this.initializer.traverse(visitor, scope); } visitor.endVisit(this, scope); }
public void traverse( ASTVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) { if (this.initializations != null) { int initializationsLength = this.initializations.length; for (int i = 0; i < initializationsLength; i++) this.initializations[i].traverse(visitor, this.scope); } if (this.condition != null) this.condition.traverse(visitor, this.scope); if (this.increments != null) { int incrementsLength = this.increments.length; for (int i = 0; i < incrementsLength; i++) this.increments[i].traverse(visitor, this.scope); } if (this.action != null) this.action.traverse(visitor, this.scope); } visitor.endVisit(this, blockScope); }
public void traverse(ASTVisitor visitor, MethodScope scope) { if (visitor.visit(this, scope)) { if (this.javadoc != null) { this.javadoc.traverse(visitor, scope); } if (this.annotations != null) { int annotationsLength = this.annotations.length; for (int i = 0; i < annotationsLength; i++) this.annotations[i].traverse(visitor, scope); } if (this.type != null) { this.type.traverse(visitor, scope); } if (this.initialization != null) this.initialization.traverse(visitor, scope); } visitor.endVisit(this, scope); }
public void traverse( ASTVisitor visitor, ClassScope classScope) { if (visitor.visit(this, classScope)) { if (this.annotations != null) { int annotationsLength = this.annotations.length; for (int i = 0; i < annotationsLength; i++) this.annotations[i].traverse(visitor, this.scope); } if (this.returnType != null) { this.returnType.traverse(visitor, this.scope); } if (this.defaultValue != null) { this.defaultValue.traverse(visitor, this.scope); } } visitor.endVisit(this, classScope); }
public void traverse(ASTVisitor visitor, ClassScope scope) { if (visitor.visit(this, scope)) { if (this.annotations != null) { int annotationsLevels = this.annotations.length; for (int i = 0; i < annotationsLevels; i++) { int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length; for (int j = 0; j < annotationsLength; j++) this.annotations[i][j].traverse(visitor, scope); } } if (this.annotationsOnDimensions != null) { for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) { Annotation[] annotations2 = this.annotationsOnDimensions[i]; for (int j = 0, max2 = annotations2 == null ? 0 : annotations2.length; j < max2; j++) { Annotation annotation = annotations2[j]; annotation.traverse(visitor, scope); } } } } visitor.endVisit(this, scope); }
static List<Class<?>> findVisits() { List<Class<?>> visits = Lists.newArrayList(); for (Method m : ASTVisitor.class.getMethods()) { if (m.getName().equals("visit") && m.getParameterTypes().length > 0) { Class<?> t = m.getParameterTypes()[0]; if (!visits.contains(t) && !t.getSimpleName().startsWith("Javadoc")) visits.add(t); } } for (Class<?> extra : EXTRA_TYPES) { if (!visits.contains(extra)) visits.add(extra); } return visits; }
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); } }
public void traverse(ASTVisitor visitor, ClassScope scope) { if (visitor.visit(this, scope)) { if (this.type != null) { this.type.traverse(visitor, scope); } } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, ClassScope scope) { if (visitor.visit(this, scope)) { for (int i = 0, max = this.typeArguments.length; i < max; i++) { if (this.typeArguments[i] != null) { for (int j = 0, max2 = this.typeArguments[i].length; j < max2; j++) { this.typeArguments[i][j].traverse(visitor, scope); } } } } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { this.left.traverse(visitor, scope); this.right.traverse(visitor, scope); } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) { if (this.argument != null) { this.argument.traverse(visitor, blockScope); } } visitor.endVisit(this, blockScope); }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.type != null) { this.type.traverse(visitor, scope); } if (this.bounds != null) { int boundsLength = this.bounds.length; for (int i = 0; i < boundsLength; i++) { this.bounds[i].traverse(visitor, scope); } } } visitor.endVisit(this, scope); }
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); }
public void traverse(ASTVisitor visitor, ClassScope scope) { if (visitor.visit(this, scope)) { if (this.receiver != null) { this.receiver.traverse(visitor, scope); } if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } } visitor.endVisit(this, scope); }
public void traverse( ASTVisitor visitor, ClassScope blockScope) { if (visitor.visit(this, blockScope)) { this.qualification.traverse(visitor, blockScope); } visitor.endVisit(this, blockScope); }
public void traverse( ASTVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) { if (this.statement != null) this.statement.traverse(visitor, blockScope); } visitor.endVisit(this, blockScope); }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { this.lhs.traverse(visitor, scope); this.expression.traverse(visitor, scope); } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, ClassScope scope) { if (visitor.visit(this, scope)) { if (this.annotations != null) { int annotationsLength = this.annotations.length; for (int i = 0; i < annotationsLength; i++) this.annotations[i].traverse(visitor, scope); } if (this.type != null) this.type.traverse(visitor, scope); } visitor.endVisit(this, scope); }
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); }
public void traverse( ASTVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) { this.elementVariable.traverse(visitor, this.scope); if (this.collection != null) { this.collection.traverse(visitor, this.scope); } if (this.action != null) { this.action.traverse(visitor, this.scope); } } visitor.endVisit(this, blockScope); }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.annotations != null) { int annotationsLevels = this.annotations.length; for (int i = 0; i < annotationsLevels; i++) { int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length; for (int j = 0; j < annotationsLength; j++) this.annotations[i][j].traverse(visitor, scope); } } Annotation [][] annotationsOnDimensions = getAnnotationsOnDimensions(true); if (annotationsOnDimensions != null) { for (int i = 0, max = annotationsOnDimensions.length; i < max; i++) { Annotation[] annotations2 = annotationsOnDimensions[i]; for (int j = 0, max2 = annotations2 == null ? 0 : annotations2.length; j < max2; j++) { Annotation annotation = annotations2[j]; annotation.traverse(visitor, scope); } } } for (int i = 0, max = this.typeArguments.length; i < max; i++) { if (this.typeArguments[i] != null) { for (int j = 0, max2 = this.typeArguments[i].length; j < max2; j++) { this.typeArguments[i][j].traverse(visitor, scope); } } } } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, ClassScope scope) { if (visitor.visit(this, scope)) { if (this.annotations != null) { int annotationsLevels = this.annotations.length; for (int i = 0; i < annotationsLevels; i++) { int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length; for (int j = 0; j < annotationsLength; j++) this.annotations[i][j].traverse(visitor, scope); } } Annotation [][] annotationsOnDimensions = getAnnotationsOnDimensions(true); if (annotationsOnDimensions != null) { for (int i = 0, max = annotationsOnDimensions.length; i < max; i++) { Annotation[] annotations2 = annotationsOnDimensions[i]; for (int j = 0, max2 = annotations2 == null ? 0 : annotations2.length; j < max2; j++) { Annotation annotation = annotations2[j]; annotation.traverse(visitor, scope); } } } for (int i = 0, max = this.typeArguments.length; i < max; i++) { if (this.typeArguments[i] != null) { for (int j = 0, max2 = this.typeArguments[i].length; j < max2; j++) { this.typeArguments[i][j].traverse(visitor, scope); } } } } visitor.endVisit(this, scope); }
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); }
public void traverse(ASTVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) { this.expression.traverse(visitor, this.scope); this.block.traverse(visitor, this.scope); } visitor.endVisit(this, blockScope); }
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); }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { for (int i = 0, max = this.counter; i < max; i++) { this.literals[i].traverse(visitor, scope); } } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { for (int i = 0, max = this.typeArguments.length; i < max; i++) { this.typeArguments[i].traverse(visitor, scope); } } visitor.endVisit(this, scope); }
public void traverse(ASTVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) { this.condition.traverse(visitor, blockScope); if (this.thenStatement != null) this.thenStatement.traverse(visitor, blockScope); if (this.elseStatement != null) this.elseStatement.traverse(visitor, blockScope); } visitor.endVisit(this, blockScope); }
public void traverse( ASTVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) { this.type.traverse(visitor, blockScope); } visitor.endVisit(this, blockScope); }
public void traverse(ASTVisitor visitor, ClassScope scope) { if (visitor.visit(this, scope)) { if (this.type != null) { this.type.traverse(visitor, scope); } if (this.memberValue != null) { this.memberValue.traverse(visitor, scope); } } visitor.endVisit(this, scope); }