try {
final ClassLoader loader = FunctorCompiler.class.getClassLoader();
thread.setContextClassLoader(loader);
final MustacheFactory factory = new DefaultMustacheFactory();
final Mustache mustache = factory.compile("templates/template.mustache");
try {
final Filer filer = processingEnv.getFiler();
final JavaFileObject file = filer.createSourceFile(type.getName().getQualified());
try (Writer writer = file.openWriter()) {
mustache.execute(writer, type).flush();
}
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
} finally {