use of org.thymeleaf.util.LazyProcessingCharSequence in project thymeleaf by thymeleaf.
the class AbstractStandardInliner method inlineSwitchTemplateMode.
private CharSequence inlineSwitchTemplateMode(final ITemplateContext context, final IText text) {
final TemplateManager templateManager = context.getConfiguration().getTemplateManager();
final TemplateModel templateModel = templateManager.parseString(context.getTemplateData(), text.getText(), text.getLine(), text.getCol(), this.templateMode, true);
if (!this.writeTextsToOutput) {
final Writer stringWriter = new FastStringWriter(50);
templateManager.process(templateModel, context, stringWriter);
return stringWriter.toString();
}
// If we can directly write to output (and text is an IText), we will use a LazyProcessingCharSequence
return new LazyProcessingCharSequence(context, templateModel);
}
Aggregations