public abstract class BaseTemplate extends Object
Constructor and Description |
---|
BaseTemplate() |
Modifier and Type | Method and Description |
---|---|
protected void |
afterRender(Appendable buffer,
ILayout override,
boolean topLevelTemplate,
long renderTime) |
protected void |
beforeRender(Appendable buffer,
ILayout override,
boolean topLevelTemplate) |
protected ILayout |
getExplicitLayout() |
protected ILayout |
getTemplateLayout() |
protected abstract InputStream |
getTemplateResourceAsStream()
Open an
InputStream for the template resource file in the classpath/module-path. |
protected String |
getTemplateText()
Returns the raw content of the template resource file at runtime.
|
protected void |
handleException(Exception e,
String fileName,
int lineStart,
int[] templateLineNumbers) |
protected void |
setLayout(ILayout layout) |
String |
toS(Object o) |
protected abstract InputStream getTemplateResourceAsStream()
InputStream
for the template resource file in the classpath/module-path.
To be implemented internally by the generated template.
protected String getTemplateText()
If the template is hard-coded in a test and there is no template resource file, the generated template class overrides this method to return the test-provided text directly.
protected void setLayout(ILayout layout)
protected ILayout getTemplateLayout()
protected ILayout getExplicitLayout()
protected void beforeRender(Appendable buffer, ILayout override, boolean topLevelTemplate) throws IOException
IOException
protected void afterRender(Appendable buffer, ILayout override, boolean topLevelTemplate, long renderTime) throws IOException
IOException
protected void handleException(Exception e, String fileName, int lineStart, int[] templateLineNumbers)
Copyright © 2024. All rights reserved.