public abstract class BaseTemplate
extends java.lang.Object
SparkTemplate.| Constructor and Description |
|---|
BaseTemplate() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterRender(java.lang.Appendable buffer,
ILayout override,
boolean topLevelTemplate,
long renderTime) |
protected void |
beforeRender(java.lang.Appendable buffer,
ILayout override,
boolean topLevelTemplate) |
protected ILayout |
getExplicitLayout() |
protected ILayout |
getTemplateLayout() |
protected abstract java.io.InputStream |
getTemplateResourceAsStream()
Open an
InputStream for the template resource file in the classpath/module-path. |
protected java.lang.String |
getTemplateText()
Returns the raw content of the template resource file at runtime.
|
protected void |
handleException(java.lang.Exception e,
java.lang.String fileName,
int lineStart,
int[] templateLineNumbers) |
protected void |
setLayout(ILayout layout) |
java.lang.String |
toS(java.lang.Object o) |
protected abstract java.io.InputStream getTemplateResourceAsStream()
InputStream for the template resource file in the classpath/module-path.
To be implemented internally by the generated template.
protected java.lang.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(java.lang.Appendable buffer,
ILayout override,
boolean topLevelTemplate)
throws java.io.IOException
java.io.IOExceptionprotected void afterRender(java.lang.Appendable buffer,
ILayout override,
boolean topLevelTemplate,
long renderTime)
throws java.io.IOException
java.io.IOExceptionprotected void handleException(java.lang.Exception e,
java.lang.String fileName,
int lineStart,
int[] templateLineNumbers)
public java.lang.String toS(java.lang.Object o)
Copyright © 2023. All rights reserved.