コード例 #1
0
ファイル: DefinitionVisitor.java プロジェクト: ElliotCP/701A2
  public void visit(ConstructorDeclaration n, Object arg) {
    if (n.getJavaDoc() != null) {
      n.getJavaDoc().accept(this, arg);
    }
    printMemberAnnotations(n.getAnnotations(), arg);
    printModifiers(n.getModifiers());

    printTypeParameters(n.getTypeParameters(), arg);
    if (n.getTypeParameters() != null) {}

    if (n.getParameters() != null) {
      for (Iterator<Parameter> i = n.getParameters().iterator(); i.hasNext(); ) {
        Parameter p = i.next();
        p.accept(this, arg);
        if (i.hasNext()) {}
      }
    }

    if (n.getThrows() != null) {
      for (Iterator<NameExpr> i = n.getThrows().iterator(); i.hasNext(); ) {
        NameExpr name = i.next();
        name.accept(this, arg);
        if (i.hasNext()) {}
      }
    }
    n.getBlock().accept(this, arg);
  }
コード例 #2
0
 public void visit(ConstructorDeclaration n, A arg) {
   if (n.getJavaDoc() != null) {
     n.getJavaDoc().accept(this, arg);
   }
   if (n.getAnnotations() != null) {
     for (AnnotationExpr a : n.getAnnotations()) {
       a.accept(this, arg);
     }
   }
   if (n.getTypeParameters() != null) {
     for (TypeParameter t : n.getTypeParameters()) {
       t.accept(this, arg);
     }
   }
   if (n.getParameters() != null) {
     for (Parameter p : n.getParameters()) {
       p.accept(this, arg);
     }
   }
   if (n.getThrows() != null) {
     for (NameExpr name : n.getThrows()) {
       name.accept(this, arg);
     }
   }
   n.getBlock().accept(this, arg);
 }