}  for (Map.Entry<String,Expr> entry : _fieldMap.entrySet()) { out.print("cl.addField(\""); out.printJavaString(entry.getKey()); out.print("\", "); out.print("0, "); entry.getValue().generateExpr(out); out.println(");");
  public void generate(PhpWriter out)    throws IOException  {    out.addClass(this);    out.println();    out.print("private ClassDef q_cl_" + getName() + " = ");    out.print("new CompiledClassDef(\"" + getName() + "\", ");    if (getParentName() != null)      out.print("\"" + getParentName() + "\"");    else      out.print("null");    out.print(", new String[] {");    String []ifaceList = getInterfaces();    for (int i = 0; i < ifaceList.length; i++) {      if (i != 0)	out.print(", ");      out.print("\"");      out.print(ifaceList[i]);      out.print("\"");    }        out.print("}, quercus_" + getName() + ".class);");        out.println();    out.println("public static class quercus_" + getName() + " implements InstanceInitializer {");    out.pushDepth();    if (false) {      out.println();      for (String key : _fieldMap.keySet()) {	out.println("private final int _f_" + key + ";");      }    }    out.println();    out.println("public quercus_" + getName() + "(QuercusClass cl)");    out.println("{");    out.pushDepth();    out.println("cl.addInitializer(this);");    out.println();        if (_constructor != null) {      out.println("cl.setConstructor(fun_" + _constructor.getName() + ");");      out.println();    }        if (_getField != null) {      out.println("cl.setGet(fun_" + _getField.getName() + ");");      out.println();    }        if (_setField != null) {      out.println("cl.setSet(fun_" + _setField.getName() + ");");      out.println();    }        if (_call != null) {      out.println("cl.setCall(fun_" + _call.getName() + ");");      out.println();    }    if (false) {      for (String key : _fieldMap.keySet()) {	out.print("_f_" + key + " = ");	out.println("cl.addFieldIndex(\"" + key + "\");");      }    }    out.println();    for (String key : _functionMap.keySet()) {      out.print("cl.addMethod(\"");      out.printJavaString(key);      out.println("\", fun_" + key + ");");    }    for (Map.Entry<String,Expr> entry : _staticFieldMap.entrySet()) {      out.print("cl.addStaticField(\"");      out.printJavaString(entry.getKey());      out.print("\", ");      entry.getValue().generateExpr(out);      out.println(");");    }    for (Map.Entry<String,Expr> entry : _constMap.entrySet()) {      out.print("cl.addConstant(\"");      out.printJavaString(entry.getKey());      out.print("\", ");      entry.getValue().generateExpr(out);      out.println(");");    }        out.popDepth();    out.println("}");    out.println();    out.println("public static void init(QuercusClass cl)");    out.println("{");    out.pushDepth();    out.println("quercus_" + getName() + " def = new quercus_" + getName() +		"(cl);");    out.popDepth();    out.println("}");    out.println();    out.println("public void initInstance(Env env, Value valueArg)");    //out.println("   throws Throwable");    out.println("{");    out.pushDepth();    //out.println("CompiledObjectValue value = (CompiledObjectValue) valueArg;");    out.println("ObjectValue value = (ObjectValue) valueArg;");    for (Map.Entry<String,Expr> entry : _fieldMap.entrySet()) {      String key = entry.getKey();      Expr value = entry.getValue();      if (false) {	out.print("value._fields[_f_" + key + "] = ");	value.generate(out);	out.println(";");      }      else {	out.print("value.putFieldInit(env, \"" + key + "\", ");	value.generate(out);	out.println(");");      }	    }    /*    for (AbstractFunction fun : _functionMap.values()) {      fun.generateInit(out);    }    */        out.popDepth();    out.println("}");    for (AbstractFunction fun : _functionMap.values()) {      fun.generate(out);    }    // XXX:    out.println();    out.println("public void init(Env env)");    out.println("{");    out.pushDepth();    for (Map.Entry<String,Expr> var : _staticFieldMap.entrySet()) {      out.print("env.setGlobalValue(\"" + getName() + "::" + var.getKey() + "\", ");      var.getValue().generate(out);      out.println(");");    }        out.popDepth();    out.println("}");    out.popDepth();    out.println("}");  }