public class OptimizingTemplateFactory extends Object implements TemplateFactory
Constructor and Description |
---|
OptimizingTemplateFactory(TemplateFactory wrapped,
OptimizerProvider... optimizers)
Creates a factory from the given optimization steps that wraps another TemplateFactory.
|
Modifier and Type | Method and Description |
---|---|
TemplateSyntaxTree |
createTemp(String content,
EscapeMode escapeMode)
Create a temporary template from content.
|
TemplateSyntaxTree |
find(String templateName,
ResourceLoader resourceLoader,
EscapeMode escapeMode)
Load a template from the source.
|
public OptimizingTemplateFactory(TemplateFactory wrapped, OptimizerProvider... optimizers)
wrapped
- the template factory instance to be wrapped.optimizers
- the optimizers to apply (null optimizations are ignored).public TemplateSyntaxTree createTemp(String content, EscapeMode escapeMode)
TemplateFactory
createTemp
in interface TemplateFactory
content
- e.g. "Hello <cs var:name >"public TemplateSyntaxTree find(String templateName, ResourceLoader resourceLoader, EscapeMode escapeMode)
TemplateFactory
find
in interface TemplateFactory
templateName
- e.g. some/path/to/template.csresourceLoader
- use this ResourceLoader to locate the named template file and any
included files.escapeMode
- the type of escaping to apply to the entire template.Copyright © 2010–2013 Google. All rights reserved.