template
Class Template

java.lang.Object
  extended by template.Template

public class Template
extends java.lang.Object

a template object ready for evaluation


Field Summary
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 Summary
Template(java.io.File sFile)
          construct an empty template
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loadedTime

protected long loadedTime
the time when this template was loaded


sourceFile

protected java.io.File sourceFile
the source file for this template


first

protected template.Template.TemplateData first
the template data


last

protected template.Template.TemplateData last
Constructor Detail

Template

public Template(java.io.File sFile)
construct an empty template

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)