예제 #1
0
  public void visit(VariableDeclarationExpr n, Object arg) {
    printAnnotations(n.getAnnotations(), arg);
    printModifiers(n.getModifiers());

    n.getType().accept(this, arg);

    for (Iterator<VariableDeclarator> i = n.getVars().iterator(); i.hasNext(); ) {
      VariableDeclarator v = i.next();
      v.accept(this, arg);
      if (i.hasNext()) {}
    }
  }
예제 #2
0
  public void visit(FieldDeclaration n, Object arg) {
    if (n.getJavaDoc() != null) {
      n.getJavaDoc().accept(this, arg);
    }
    printMemberAnnotations(n.getAnnotations(), arg);
    printModifiers(n.getModifiers());
    n.getType().accept(this, arg);

    for (Iterator<VariableDeclarator> i = n.getVariables().iterator(); i.hasNext(); ) {
      VariableDeclarator var = i.next();
      var.accept(this, arg);
      if (i.hasNext()) {}
    }
  }