ThriftServiceMetadata.class, serviceRenderer,
Requiredness.class, new FieldRequirednessRenderer()));
ThriftContext ctx = new ThriftContext(packageName, ImmutableList.copyOf(includes.build()), thriftTypes, thriftServices, namespaceMap);
ST template = tl.load("thriftfile");
template.add("context", ctx);
template.write(new AutoIndentWriter(outputStreamWriter));
outputStreamWriter.flush();
}