- Type Parameters:
T
- the model type
- All Superinterfaces:
Renderer<T>
,TemplateInfo
- All Known Implementing Classes:
HelloModelView
,HelloModelView
,MessagePageRenderer
,MessagePageRenderer
A JStachio Template is a renderer that has template meta data.
Generated code implements this interface.
- Author:
- agentgt
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jstach.jstachio.TemplateInfo
TemplateInfo.TemplateSource
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
execute
(T model, Appendable appendable) Renders the passed in model.void
execute
(T model, Appendable a, Formatter formatter, Escaper escaper) Renders the passed in model.default void
execute
(T model, Appendable a, Function<@Nullable Object, String> formatter, Function<String, String> escaper) Renders the passed in model.Class<?>
Return the model class (root context class annotated with JStache) that generated this template.Methods inherited from interface io.jstach.jstachio.TemplateInfo
description, lastLoaded, normalizePath, supportsType, templateContentType, templateEscaper, templateFormatter, templateName, templatePath, templateSource, templateString
-
Method Details
-
execute
Renders the passed in model.- Specified by:
execute
in interfaceRenderer<T>
- Parameters:
model
- a model assumed never to benull
.appendable
- the appendable to write to.- Throws:
IOException
- if there is an error writing to the appendable
-
execute
Renders the passed in model.- Parameters:
model
- a model assumed never to benull
.a
- appendable to write to.formatter
- formats variables before they are passed to the escaperescaper
- used to write escaped variables- Throws:
IOException
- if an error occurs while writing to the appendable
-
execute
default void execute(T model, Appendable a, Function<@Nullable Object, String> formatter, Function<String, throws IOExceptionString> escaper) Renders the passed in model.- Parameters:
model
- a model assumed never to benull
.a
- appendable to write to.formatter
- formats variables before they are passed to the escaperescaper
- used to write escaped variables- Throws:
IOException
- if an error occurs while writing to the appendable
-
modelClass
Class<?> modelClass()Return the model class (root context class annotated with JStache) that generated this template.- Returns:
- model class
-