String get_factory = "getStatic" + api_factory + "()";
	private void genTypeClassImpl(Type type) {    String class_impl_name = buildClassImplName(type);    String class_name = buildClassName(type);    		println("abstract public class " + class_impl_name + " extends " + api_constructor);		println("{");		println("  private static aterm.ATermFactory factory = null;");    println();    printFoldOpen("fromString()");		println("  static " + class_name + " fromString(String str)");		println("  {");		println("    aterm.ATerm trm = factory.parse(str);");		println("    return fromTerm(trm);");		println("  }");    printFoldClose();    printFoldOpen("fromTextFile()");		println("  static " + class_name + " fromTextFile(InputStream stream) " +            "throws aterm.ParseError, IOException");		println("  {");		println("    aterm.ATerm trm = factory.readFromTextFile(stream);");		println("    return fromTerm(trm);");		println("  }");    printFoldClose();		printFoldOpen("isEqual(" + class_name + ")");		println("  public boolean isEqual(" + class_name + " peer)");		println("  {");		println("    return term.isEqual(peer.toTerm());");		println("  }");    printFoldClose();    printFoldOpen("fromTerm(aterm.ATerm trm)");    println("  public static " + class_name + " fromTerm(aterm.ATerm trm)");    println("  {");    println("    " + class_name + " tmp;");    genFromTermCalls(type);    println();    println("    throw new RuntimeException(\"This is not a " + class_name + ": \" + trm);" );    println("  }");    printFoldClose();    println();    genTypeDefaultProperties(type);    genDefaultGetAndSetMethods(type);		println();    println("}");    println();			}