<dependency>
<groupId>org.codecop</groupId>
<artifactId>snippetory</artifactId>
<version>1.3.0</version>
</dependency>
Template template = TemplateName.ofClasspath(MyClass.class, "template.html");
template.get().set("propertyName", "propertyValue");
String renderedText = template.toString();
html
<!--#var list = ["item1", "item2", "item3"]-->
<!--#foreach (item in list)-->
<!--#if (item.equals("item2"))-->
<li class="selected">${item}</li>
<!--#else-->
<li>${item}</li>
<!--#endif-->
<!--#end-->
template.registerFunction("functionName", (context, arguments) -> {
});
template.registerFilter("filterName", (input) -> {
});
<!--#var result = functionName("argument")-->