コード例 #1
0
 void genJavaWritingClassBody(PrintWriter writer, int depth, String className) {
   genJavaClassBodyComponents(writer, depth);
   writer.println();
   indent(writer, depth);
   writer.println(className + "(" + javaParams() + ") {");
   for (Iterator it = components.iterator(); it.hasNext(); ) {
     TypeNode tn = (TypeNode) it.next();
     indent(writer, depth + 1);
     writer.println("this." + tn.name() + " = " + tn.name() + ";");
   }
   indent(writer, depth);
   writer.println("}");
 }
コード例 #2
0
 void genJavaWrites(PrintWriter writer, int depth) {
   for (Iterator it = components.iterator(); it.hasNext(); ) {
     TypeNode tn = (TypeNode) it.next();
     tn.genJavaWrite(writer, depth, tn.name());
   }
 }