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();
}
}
}