String filename = includeMap.get(s);
includes.add(filename);
serviceMap.put(s, Files.getNameWithoutExtension(filename));
}
this.thriftTypeRenderer = new ThriftTypeRenderer(typenameMap.build());
ThriftServiceMetadataRenderer serviceRenderer = new ThriftServiceMetadataRenderer(serviceMap.build());
TemplateLoader tl = new TemplateLoader(ImmutableList.of("thrift/common.st"),
ImmutableMap.of(ThriftType.class, thriftTypeRenderer, ThriftServiceMetadata.class, serviceRenderer));
ThriftContext ctx = new ThriftContext(packageName, ImmutableList.copyOf(includes.build()), thriftTypes, thriftServices, namespaceMap);
ST template = tl.load("thriftfile");
template.add("context", ctx);