public class Template
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected template.Template.TemplateData |
first
the template data
|
protected template.Template.TemplateData |
last |
protected long |
loadedTime
the time when this template was loaded
|
protected java.io.File |
sourceFile
the source file for this template
|
Constructor and Description |
---|
Template(java.io.File sFile)
construct an empty template
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(template.Template.TemplateData n) |
void |
addStatements(sleep.engine.Block block) |
void |
addString(java.lang.String text) |
void |
evaluate(sleep.runtime.ScriptInstance script,
java.util.Stack locals)
evaluates the template
|
boolean |
isValid()
check if this template is still valid (otherwise it must be reloaded)
|
protected void |
runCode(sleep.runtime.ScriptEnvironment environment,
sleep.interfaces.Variable locals) |
protected long loadedTime
protected java.io.File sourceFile
protected template.Template.TemplateData first
protected template.Template.TemplateData last
protected void runCode(sleep.runtime.ScriptEnvironment environment, sleep.interfaces.Variable locals)
public void evaluate(sleep.runtime.ScriptInstance script, java.util.Stack locals)
public boolean isValid()
public void addString(java.lang.String text)
protected void add(template.Template.TemplateData n)
public void addStatements(sleep.engine.Block block)