@Test public void cForSortEmployees() { String results = template.replace("\n<c:for items='employees'> $this.firstName </c:for>", Maps.map("employees", employees)); Boon.equalsOrDie("#\n" + " Rick Adam Zed Lucas Ryan #", "#" + results + "#"); results = template.replace( "<c:for items='${fn:sortBy(employees,firstName)}'>$this.firstName</c:for>", Maps.map("employees", employees)); Boon.equalsOrDie("#AdamLucasRickRyanZed#", "#" + results + "#"); }
@Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); }
BoonTemplate implements Template { @Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); } }
BoonTemplate implements Template { @Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); } BoonTemplate();  BoonTemplate(TemplateParser templateParser);  BoonTemplate(ExpressionContext context, TemplateParser templateParser); }
BoonTemplate implements Template { @Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); } BoonTemplate();  BoonTemplate(TemplateParser templateParser);  BoonTemplate(ExpressionContext context, TemplateParser templateParser); @Override String replace(String template, Object... context); @Override String replaceFromResource(String resource, Object... context); @Override String replaceFromFile(String resource, Object... context); @Override String replaceFromURI(String resource, Object... context); String inlcudeFromURI(String resource); void displayTokens(); static Template template(); static Template jstl(); void addFunctions(Class<?> functions); void addFunctions(String prefix, Class<?> functions); }
BoonTemplate implements Template { @Override public String replace(String template, Object... context) { initContext(context); this.template = template; parser.parse(template); _buf.readForRecycle(); Iterator<Token> tokens = parser.getTokenList().iterator(); while (tokens.hasNext()) { final Token token = tokens.next(); processToken(tokens, token); } return _buf.toString(); } BoonTemplate();  BoonTemplate(TemplateParser templateParser);  BoonTemplate(ExpressionContext context, TemplateParser templateParser); @Override String replace(String template, Object... context); @Override String replaceFromResource(String resource, Object... context); @Override String replaceFromFile(String resource, Object... context); @Override String replaceFromURI(String resource, Object... context); String inlcudeFromURI(String resource); void displayTokens(); static Template template(); static Template jstl(); void addFunctions(Class<?> functions); void addFunctions(String prefix, Class<?> functions);  }