@Test public void t2() { String template = Templates.template("classpath:template/tpl.txt"); String value = engine.render(template, MoreObjects.mapOf("a", 1, "b", new int[]{5, 9, 7})); Assert.assertEquals("a = 1;b[0]=5;b[1]=9;b[2]=7;", value); }
@Override public String render(String template, Map<String, Object> attrs) { StringWriter writer = new StringWriter(); render(template, attrs, writer); return writer.toString(); }
SimpleTemplateEngine implements TemplateEngine { @Override public String render(String template, Map<String, Object> attrs) { StringWriter writer = new StringWriter(); render(template, attrs, writer); return writer.toString(); } }
SimpleTemplateEngine implements TemplateEngine { @Override public String render(String template, Map<String, Object> attrs) { StringWriter writer = new StringWriter(); render(template, attrs, writer); return writer.toString(); }  }
SimpleTemplateEngine implements TemplateEngine { @Override public String render(String template, Map<String, Object> attrs) { StringWriter writer = new StringWriter(); render(template, attrs, writer); return writer.toString(); }  @Override String render(String template, Map<String, Object> attrs); @Override void render(String template, Map<String, Object> attrs, Writer writer); }
SimpleTemplateEngine implements TemplateEngine { @Override public String render(String template, Map<String, Object> attrs) { StringWriter writer = new StringWriter(); render(template, attrs, writer); return writer.toString(); }  @Override String render(String template, Map<String, Object> attrs); @Override void render(String template, Map<String, Object> attrs, Writer writer);  }