public class DefaultTheme extends Object implements Theme
Theme implementation that uses a simple
synchronized map to store themes.| Constructor and Description |
|---|
DefaultTheme() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTemplate(String templateName,
Template template)
Adds a template with the given name.
|
Template |
getTemplate(String templateName)
Returns the template with the given name.
|
void |
render(String templateName,
TemplateContext templateContext,
Writer writer)
Renders the template with the given name using the the given template
context to the given writer.
|
public void addTemplate(String templateName, Template template)
templateName - The name of the templatetemplate - The templatepublic Template getTemplate(String templateName)
templateName - The name of the templatenull if no such
template existspublic void render(String templateName, TemplateContext templateContext, Writer writer) throws TemplateException, IOException
render in interface ThemetemplateName - The name of the template to rendertemplateContext - The template contextwriter - The writerTemplateException - if a template error occursIOException - if an I/O error occursCopyright © 2026. All rights reserved.