@Override public void generate(Path path, Object scope) throws IOException { Mustaches.execute(template, scope, resolvePath(path, this.path, scope)); } }
@Override public String toString() { return "Name{" + "name='" + name + '\'' + ", clazz=" + MoreObjects.toString(clazz) + '}'; }
private static TemplateArchetypeEntry buildTemplate(String tplPath, CharSource charSource) { return new TemplateArchetypeEntry(Mustaches.compile(tplPath, charSource), tplPath .replaceAll("^_([^/]+$)", "$1") .replaceAll("/_([^/]+$)", "/$1") .replaceAll("\\$([^_]+)\\$", "\\{\\{$1\\}\\}")); }
@Override public void start() { ThreadLocalMillisProvider.setCurrentMillisFixed(millis); }
@Override public Optional<String> appPackage() { return config.getString("restx.app.package"); }
@Override public void close() throws Exception { ThreadLocalMillisProvider.clear(); } }
public void generate(Path path, Object scope) throws IOException { for (ArchetypeEntry entry : entries) { entry.generate(path, scope); } } }
@Override public Template load(String template) throws Exception { return Mustaches.compileTemplateWithSingleBrackets(template); } });
@Override public boolean isApplicableTo(String fqcn) { return matchesParameterizedFQCN(Set.class, fqcn); }
@Override public Optional<Boolean> autoCompile() { return config.getBoolean("restx.router.autocompile"); }
private static TemplateArchetypeEntry buildTemplate(String tplPath, CharSource charSource) { return new TemplateArchetypeEntry(Mustaches.compile(tplPath, charSource), tplPath .replaceAll("^_([^/]+$)", "$1") .replaceAll("/_([^/]+$)", "/$1") .replaceAll("\\$([^_]+)\\$", "\\{\\{$1\\}\\}")); }
@Override public void generate(Path path, Object scope) throws IOException { Mustaches.execute(template, scope, resolvePath(path, this.path, scope)); } }
@Override public String toString() { return "QueryByClass{" + "componentClass=" + MoreObjects.toString(componentClass) + '}'; } }
@Override public Optional<String> host() { return config.getString("restx.http.host"); }
@Override public void close() throws Exception { ThreadLocalMillisProvider.clear(); } }
public void generate(Path path, Object scope) throws IOException { for (ArchetypeEntry entry : entries) { entry.generate(path, scope); } } }
@Override public Template load(String template) throws Exception { return Mustaches.compileTemplateWithSingleBrackets(template); } });
private static TemplateArchetypeEntry buildTemplate(String basePath, String tpl) { return new TemplateArchetypeEntry(Mustaches.compile(basePath + tpl), tpl .replaceAll("^_([^/]+$)", "$1") .replaceAll("/_([^/]+$)", "/$1") .replaceAll("\\$([^_]+)\\$", "\\{\\{$1\\}\\}")); }
@Override public Optional<String> scheme() { return config.getString("restx.http.scheme"); }