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.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);
       }
     }
     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.length; j < max2; j++) {
           Annotation annotation = annotations2[j];
           annotation.traverse(visitor, 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 scope) {
   if (visitor.visit(this, scope)) {
     this.left.traverse(visitor, scope);
     this.right.traverse(visitor, scope);
   }
   visitor.endVisit(this, scope);
 }
Beispiel #4
0
 public void traverse(ASTVisitor visitor, BlockScope blockScope) {
   if (visitor.visit(this, blockScope)) {
     this.type.traverse(visitor, blockScope);
     this.expression.traverse(visitor, blockScope);
   }
   visitor.endVisit(this, blockScope);
 }
 public void traverse(ASTVisitor visitor, BlockScope scope) {
   if (visitor.visit(this, scope)) {
     this.assertExpression.traverse(visitor, scope);
     if (this.exceptionArgument != null) {
       this.exceptionArgument.traverse(visitor, scope);
     }
   }
   visitor.endVisit(this, scope);
 }
 public void traverse(ASTVisitor visitor, BlockScope scope) {
   if (visitor.visit(this, scope)) {
     if (this.action != null) {
       this.action.traverse(visitor, scope);
     }
     this.condition.traverse(visitor, scope);
   }
   visitor.endVisit(this, scope);
 }
Beispiel #7
0
  public void traverse(ASTVisitor visitor, BlockScope scope) {

    if (visitor.visit(this, scope)) {
      if (this.expressions != null) {
        int expressionsLength = this.expressions.length;
        for (int i = 0; i < expressionsLength; i++) this.expressions[i].traverse(visitor, scope);
      }
    }
    visitor.endVisit(this, scope);
  }
Beispiel #8
0
 /* (non-Javadoc)
  * @see org.eclipse.jdt.internal.compiler.ast.AstNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
  */
 public void traverse(ASTVisitor visitor, BlockScope scope) {
   if (visitor.visit(this, scope)) {
     if (this.returnType != null) this.returnType.traverse(visitor, scope);
     if (this.arguments != null) {
       int argumentLength = this.arguments.length;
       for (int i = 0; i < argumentLength; i++) this.arguments[i].traverse(visitor, scope);
     }
   }
   visitor.endVisit(this, scope);
 }
  public void traverse(ASTVisitor visitor, BlockScope scope) {

    if (visitor.visit(this, scope)) {
      int dimensionsLength = dimensions.length;
      type.traverse(visitor, scope);
      for (int i = 0; i < dimensionsLength; i++) {
        if (dimensions[i] != null) dimensions[i].traverse(visitor, scope);
      }
      if (initializer != null) initializer.traverse(visitor, scope);
    }
    visitor.endVisit(this, scope);
  }
  public void traverse(ASTVisitor visitor, BlockScope blockScope) {
    // {ObjectTeams: alternate AST?
    if (this.roleClassLiteralAccess != null) {
      this.roleClassLiteralAccess.traverse(visitor, blockScope);
      return;
    }
    // SH}

    if (visitor.visit(this, blockScope)) {
      this.type.traverse(visitor, blockScope);
    }
    visitor.endVisit(this, blockScope);
  }
 public void traverse(ASTVisitor visitor, BlockScope blockScope) {
   if (visitor.visit(this, blockScope)) {
     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, ClassScope classScope) {
   if (visitor.visit(this, classScope)) {
     this.roleMethodSpec.traverse(visitor, this.scope);
     for (int idx = 0; idx < this.baseMethodSpecs.length; idx++) {
       this.baseMethodSpecs[idx].traverse(visitor, this.scope);
     }
     if (this.mappings != null) {
       for (int idy = 0; idy < this.mappings.length; idy++) {
         ParameterMapping mapping = this.mappings[idy];
         mapping.traverse(visitor, this.scope);
       }
     }
   }
   visitor.endVisit(this, classScope);
 }
Beispiel #13
0
 public void traverse(ASTVisitor visitor, BlockScope blockScope) {
   if (visitor.visit(this, blockScope)) {
     this.receiver.traverse(visitor, blockScope);
     if (this.typeArguments != null) {
       for (int i = 0, typeArgumentsLength = this.typeArguments.length;
           i < typeArgumentsLength;
           i++) {
         this.typeArguments[i].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);
 }
 public void traverse(ASTVisitor var1, MethodScope var2) {
   if (var1.visit(this, var2)) {
     if (this.annotations != null) {
       int var3 = this.annotations.length;
       for (int var4 = 0; var4 < var3; ++var4) {
         this.annotations[var4].traverse(var1, var2);
       }
     }
     if (this.type != null) {
       this.type.traverse(var1, var2);
     }
     if (this.initialization != null) {
       this.initialization.traverse(var1, var2);
     }
   }
   var1.endVisit(this, var2);
 }
 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
   }
 }
 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 var1, BlockScope var2) {
   if (var1.visit(this, var2)) {
     this.field_687.traverse(var1, var2);
   }
   var1.endVisit(this, var2);
 }
 public void traverse(ASTVisitor visitor, BlockScope scope) {
   if (visitor.visit(this, scope)) {
     this.receiver.traverse(visitor, scope);
   }
   visitor.endVisit(this, scope);
 }
Beispiel #20
0
 public void traverse(ASTVisitor visitor, BlockScope scope) {
   visitor.visit(this, scope);
   visitor.endVisit(this, scope);
 }
 public void traverse(ASTVisitor var1, BlockScope var2) {
   if (var1.visit(this, var2) && this.type != null) {
     this.type.traverse(var1, var2);
   }
   var1.endVisit(this, var2);
 }