public ErrorAnnotationProcessor() { errorDescriptorTpl = Mustaches.compile(ErrorAnnotationProcessor.class, "ErrorDescriptor.mustache"); }
public RestxAnnotationProcessor() { routerTpl = Mustaches.compile(RestxAnnotationProcessor.class, "RestxRouter.mustache"); }
public FactoryAnnotationProcessor() { componentMachineTpl = compile(FactoryAnnotationProcessor.class, "ComponentMachine.mustache"); conditionalMachineTpl = compile(FactoryAnnotationProcessor.class, "ConditionalMachine.mustache"); moduleMachineTpl = compile(FactoryAnnotationProcessor.class, "ModuleMachine.mustache"); machinesDeclaration = new ServicesDeclaration("restx.factory.FactoryMachine"); }
private static TemplateArchetypeEntry buildTemplate(String basePath, String tpl) { return new TemplateArchetypeEntry(Mustaches.compile(basePath + tpl), tpl .replaceAll("^_([^/]+$)", "$1") .replaceAll("/_([^/]+$)", "/$1") .replaceAll("\\$([^_]+)\\$", "\\{\\{$1\\}\\}")); }
private static TemplateArchetypeEntry buildTemplate(String tplPath, CharSource charSource) { return new TemplateArchetypeEntry(Mustaches.compile(tplPath, charSource), tplPath .replaceAll("^_([^/]+$)", "$1") .replaceAll("/_([^/]+$)", "/$1") .replaceAll("\\$([^_]+)\\$", "\\{\\{$1\\}\\}")); }
private static TemplateArchetypeEntry buildTemplate(String basePath, String tpl) { return new TemplateArchetypeEntry(Mustaches.compile(basePath + tpl), tpl .replaceAll("^_([^/]+$)", "$1") .replaceAll("/_([^/]+$)", "/$1") .replaceAll("\\$([^_]+)\\$", "\\{\\{$1\\}\\}")); }
private static TemplateArchetypeEntry buildTemplate(String tplPath, CharSource charSource) { return new TemplateArchetypeEntry(Mustaches.compile(tplPath, charSource), tplPath .replaceAll("^_([^/]+$)", "$1") .replaceAll("/_([^/]+$)", "/$1") .replaceAll("\\$([^_]+)\\$", "\\{\\{$1\\}\\}")); }
public static Template compile(Class relativeTo, String name) { return compile(name, asCharSource(getResource(relativeTo, name), Charsets.UTF_8)); }
public static Template compile(String name) { return compile(name, asCharSource(getResource(name), Charsets.UTF_8)); }
public static Template compile(String name) { return compile(name, asCharSource(getResource(name), Charsets.UTF_8)); }
public static Template compile(Class relativeTo, String name) { return compile(name, asCharSource(getResource(relativeTo, name), Charsets.UTF_8)); }
String r = Mustaches.execute(Mustaches.compile(JsonAssertions.class, "json-diff.html"), ImmutableMap.of( "actual", actual.content(),
String r = Mustaches.execute(Mustaches.compile(JsonAssertions.class, "json-diff.html"), ImmutableMap.of( "actual", actual.content(),