code: public void generate(Definition def, Writer out) throws IOException
     {
        writeHeader(def, out);
        writeImport(def, out);
        writeClassComment(def, out);
        writeClassBody(def, out);
     }
docs: generate code
  
  @param def Definition
  @param out Writer
  @throws IOException ioException