public static void main(String[] args) { String template = "@args java.util.List<String> users, String title, String name; @each String u: users @u @ title: @title name: @name "; List<String> l = new ArrayList<String>(); l.add("green"); l.add("cherry"); ITemplate t = engine.getTemplate(template); t.setRenderArg("users", l); t.setRenderArg(2, "Green"); t.setRenderArg(1, "Mr."); System.out.println(t.render()); }
public static String renderString(String template, Object... args) { return engine.renderString(template, args); }
public boolean isProdMode() { return engine.isProdMode(); }
public static String render(File file, Object... args) { return engine.render(file, args); }
public static void clearTemplateClassEnhancer() { engine.clearTemplateClassEnhancer(); }
public static boolean registerTag(ITag tag) { return engine.registerTag(tag); }
public static void clearListener() { engine.clearListener(); }
public static void unregisterTemplateClassEnhancer(ITemplateClassEnhancer enhancer) { engine.unregisterTemplateClassEnhancer(enhancer); }
public static void unregisterListener(IRythmListener listener) { engine.unregisterListener(listener); }
public static void init() { engine.init(); }
public static void init(Properties conf) { engine.init(conf); }
public static ExtensionManager getExtensionManager() { return engine.getExtensionManager(); }
// --- SPI interfaces --- public static DialectManager getDialectManager() { return engine.getDialectManager(); }