org.millscript.millscript
Class Session

java.lang.Object
  extended by org.millscript.millscript.Session
Direct Known Subclasses:
Batch, Interactive

public abstract class Session
extends java.lang.Object

This is class represents a MillScript session.


Field Summary
protected  Configuration config
          This sessions configuration.
protected  Engine engine
          This sessions engine.
protected  CompilerState state
          This sessions compiler state.
 
Constructor Summary
Session()
          Constructs a new session.
 
Method Summary
 void compile(Source source)
          Compiles from the specified source.
 void compile(java.lang.String[] files)
          Compiles the specified files sequentially.
abstract  void compile(java.lang.String origin, java.io.Reader r)
          Compiles code read from the specified reader, with the specified origin message.
 void compile(org.millscript.commons.vfs.VFile file)
          Compiles from the specified virtual file.
 void printStatistics(long startTime)
          Print statistics for the current session.
 void summarizeResults()
          Summarizes any results left in the engine/machine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected Configuration config
This sessions configuration.


engine

protected Engine engine
This sessions engine.


state

protected CompilerState state
This sessions compiler state.

Constructor Detail

Session

public Session()
Constructs a new session.

Method Detail

compile

public void compile(java.lang.String[] files)
Compiles the specified files sequentially.

Parameters:
files - a String array holding file names to compile

compile

public abstract void compile(java.lang.String origin,
                             java.io.Reader r)
Compiles code read from the specified reader, with the specified origin message.

Parameters:
origin - the origin message for any problems.
r - the reader to read code from.

compile

public void compile(org.millscript.commons.vfs.VFile file)
Compiles from the specified virtual file.

Parameters:
file - the virtual file to compile from.

compile

public void compile(Source source)
Compiles from the specified source.

Parameters:
source - the source to compile from.

printStatistics

public void printStatistics(long startTime)
Print statistics for the current session. This is used at the end of a session, to display total execution time and number of different pages milled.

Parameters:
startTime - the time in milliseconds that the session was started.

summarizeResults

public void summarizeResults()
Summarizes any results left in the engine/machine.



Copyright © 2001-2007 Open World Ltd. All Rights Reserved.