else if (field_type.equals("term")) { println("      args.add((aterm.ATerm) getArgument(" + i + "));"); }
	private void genAltToTerm(Type type, Alternative alt) {    if (hasReservedTypeFields(type, alt)) {      println("  public aterm.ATerm toTerm() {");      println("    if(term == null) {");      println("      java.util.List args = new java.util.LinkedList();");      Iterator fields = type.altFieldIterator(alt.getId());      for (int i = 0; fields.hasNext(); i++) {        Field field = (Field) fields.next();        String field_type = field.getType();                if (field_type.equals("str")) {          println("      args.add(((aterm.ATermAppl) getArgument(" + i + ")).getAFun().getName());");        }        else if (field_type.equals("int")) {          println("      args.add(new Integer(((aterm.ATermInt) getArgument(" + i + ")).getInt()));");        }        else if (field_type.equals("real")) {          println("      args.add(new Double (((aterm.ATermReal) getArgument(" + i + ")).getReal()));");        }        else {          println("      args.add(((" + api_constructor + ") getArgument(" + i + ")).toTerm());");        }      }      println("      setTerm(getFactory().make(getPattern(), args));");      println("    }");      println("    return term;");      println("  }");      println();    }	}