protected Writer writeTemplate(Writer writer, String templateText, List<Object> scopes) { return df.getFragment(new FragmentKey(tc, templateText)).execute(writer, scopes); }
@SuppressWarnings("unchecked") protected void handleFunction(Writer writer, Function function, List<Object> scopes) throws IOException { String value; Object newtemplate = function.apply(null); if (newtemplate == null) { value = ""; } else { String templateText = newtemplate.toString(); StringWriter sw = new StringWriter(); // The specification says that template functions need to be parsed with the default delimiters // Running Interpolation - Alternate Delimiters - A lambda's return value should parse with the default delimiters.: failed! // TemplateContext newTC = new TemplateContext(tc.startChars(), tc.endChars(), tc.file(), tc.line(), tc.startOfLine()); TemplateContext newTC = new TemplateContext(DEFAULT_SM, DEFAULT_EM, tc.file(), tc.line(), tc.startOfLine()); df.getFragment(new FragmentKey(newTC, templateText)).execute(sw, scopes).close(); value = sw.toString(); } execute(writer, value); }
protected Writer writeTemplate(Writer writer, String templateText, List<Object> scopes) { return df.getFragment(new FragmentKey(tc, templateText)).execute(writer, scopes); }
protected Writer writeTemplate(Writer writer, String templateText, List<Object> scopes) { return df.getFragment(new FragmentKey(tc, templateText)).execute(writer, scopes); }
@SuppressWarnings("unchecked") protected void handleFunction(Writer writer, Function function, List<Object> scopes) throws IOException { String value; Object newtemplate = function.apply(null); if (newtemplate == null) { value = ""; } else { String templateText = newtemplate.toString(); StringWriter sw = new StringWriter(); // The specification says that template functions need to be parsed with the default delimiters // Running Interpolation - Alternate Delimiters - A lambda's return value should parse with the default delimiters.: failed! // TemplateContext newTC = new TemplateContext(tc.startChars(), tc.endChars(), tc.file(), tc.line(), tc.startOfLine()); TemplateContext newTC = new TemplateContext(DEFAULT_SM, DEFAULT_EM, tc.file(), tc.line(), tc.startOfLine()); df.getFragment(new FragmentKey(newTC, templateText)).execute(sw, scopes).close(); value = sw.toString(); } execute(writer, value); }
@SuppressWarnings("unchecked") protected void handleFunction(Writer writer, Function function, List<Object> scopes) throws IOException { String value; Object newtemplate = function.apply(null); if (newtemplate == null) { value = ""; } else { String templateText = newtemplate.toString(); StringWriter sw = new StringWriter(); // The specification says that template functions need to be parsed with the default delimiters // Running Interpolation - Alternate Delimiters - A lambda's return value should parse with the default delimiters.: failed! // TemplateContext newTC = new TemplateContext(tc.startChars(), tc.endChars(), tc.file(), tc.line(), tc.startOfLine()); TemplateContext newTC = new TemplateContext(DEFAULT_SM, DEFAULT_EM, tc.file(), tc.line(), tc.startOfLine()); df.getFragment(new FragmentKey(newTC, templateText)).execute(sw, scopes).close(); value = sw.toString(); } execute(writer, value); }