<#function avg x y> <#return (x + y) / 2> </#function> ${avg(10, 20)} ------------------------------------------------------------------------------------------ public class ManagerMethod implements TemplateMethodModel { public TemplateModel exec(List args) throws TemplateModelException { for(int i=0;i<args.size();i++) { System.out.println(args.get(i)); } return new SimpleNumber(1815); } } root.put("mgr", new ManagerMethod()); --${mgr("met",3,"good")}--
|
|