+ template.render(templateContextFactory.createTemplateContext().mergeContext(template.getInitialContext()), writer);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void render(TemplateContext templateContext, Writer writer) throws TemplateException {
+ template.render(templateContext.mergeContext(template.getInitialContext()), writer);
+ }
+
+ //
+ // OBJECT METHODS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ StringWriter stringWriter = new StringWriter();
+ try {
+ render(stringWriter);
+ } catch (IOException ioe1) {
+ /* should never throw, ignore. */
+ }
+ return stringWriter.toString();