Package template
Class Template
- java.lang.Object
-
- template.Template
-
public class Template extends java.lang.Object
a template object ready for evaluation
-
-
Field Summary
Fields Modifier and Type Field Description protected template.Template.TemplateData
first
the template dataprotected template.Template.TemplateData
last
protected long
loadedTime
the time when this template was loadedprotected java.io.File
sourceFile
the source file for this template
-
Constructor Summary
Constructors Constructor Description Template(java.io.File sFile)
construct an empty template
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 templateboolean
isValid()
check if this template is still valid (otherwise it must be reloaded)protected void
runCode(sleep.runtime.ScriptEnvironment environment, sleep.interfaces.Variable locals)
-
-
-
Method Detail
-
runCode
protected void runCode(sleep.runtime.ScriptEnvironment environment, sleep.interfaces.Variable locals)
-
evaluate
public void evaluate(sleep.runtime.ScriptInstance script, java.util.Stack locals)
evaluates the template
-
isValid
public boolean isValid()
check if this template is still valid (otherwise it must be reloaded)
-
addString
public void addString(java.lang.String text)
-
add
protected void add(template.Template.TemplateData n)
-
addStatements
public void addStatements(sleep.engine.Block block)
-
-