out.println("  };"); out.println("}");
println(out,"  };"); println(out,"}");
    public void writeFactory(String path) {      debug("Writing AssetFactory to "+path);      if (cleanp) {        (new File(path)).delete();        return;      }      try {        noteFile(path);        PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(new File(getTargetDir(),path))));        writeCR(out);              out.println("package " + asset_package + ";");        out.println("import org.cougaar.domain.planning.ldm.asset.EssentialAssetFactory;");        out.println();        out.println("public class AssetFactory extends EssentialAssetFactory {");        out.println("  public static String[] assets = {");        for (Enumeration cds = classds.elements(); cds.hasMoreElements(); ) {          ClassD cd = (ClassD) cds.nextElement();          String name = cd.getName();          out.print("    \""+asset_package+"."+name+"\"");          if (cds.hasMoreElements()) out.print(",");          out.println();        }        out.println("  };");        out.println("}");        out.close();      } catch (Exception e) {        System.err.println("Caught Exception while writing "+path);        e.printStackTrace();      }    }