docs: @Override
      public void emit(SinkFactory factory, Doc doc) {
      	logger.fine("Generating Java source based on " + doc.srcInfo);
          final StringBuilder header = new StringBuilder();
          header.append(ASTPrinter.printComments("", commentProcessor.leftAlign(doc.pkg.comments)));
          header.append(doc.pkg.name.isEmpty() ? "" : ("package " + doc.pkg.name + ";\n\n"));
          if (!doc.imports.isEmpty()) {
              for (Imprt imp : doc.imports) {
                  header.append(ASTPrinter.printComments("", commentProcessor.leftAlign(imp.comments)));
                  header.append("import " + imp.name + ";\n");
              }
              header.append("\n");
          }
          final String version = new Version().getVersion();
          header.append("/*\nThis file was generated based on " + doc.srcInfo + " using jADT version " + version + " http://jamesiry.github.com/jADT/ . Please do not modify directly.\n\n");
          header.append("The source was parsed as: \n\n");
          
          for (DataType dataType : doc.dataTypes) {
              final Sink sink = factory.createSink(doc.pkg.name.isEmpty() ? dataType.name : doc.pkg.name + "." + dataType.name);
              logger.info("Generating " + sink.getInfo());
              try {
                  dataTypeEmitter.emit(sink, dataType, header.toString());
              } finally {
                  sink.close();
              }
          }        
      }