Пример #1
0
  public void visit(Parameter n, Object arg) {
    printAnnotations(n.getAnnotations(), arg);
    printModifiers(n.getModifiers());

    n.getType().accept(this, arg);
    if (n.isVarArgs()) {}
    n.getId().accept(this, arg);
  }
 public void visit(Parameter n, A arg) {
   if (n.getAnnotations() != null) {
     for (AnnotationExpr a : n.getAnnotations()) {
       a.accept(this, arg);
     }
   }
   n.getType().accept(this, arg);
   n.getId().accept(this, arg);
 }
 /** @param p */
 protected void addField(Parameter p) {
   // no need
   String defaultVal = "=" /*+ JavaSyntaxTool.getDefault(p)*/;
   pln(
       TAB
           + "private "
           + p.getType()
           + " "
           + p.getId()
           + (defaultVal.equals("=") ? "" : defaultVal)
           + ";");
 }