org.millscript.millscript.vm
Class StandardEngine

java.lang.Object
  extended by org.millscript.millscript.vm.Engine
      extended by org.millscript.millscript.vm.StandardEngine

public class StandardEngine
extends Engine

This class represents a standard MillScript Engine. A standard enigne differs in that every package created by it will always have a standard package automatically imported. This allows us to define the standard MillScript variables within this package.


Constructor Summary
StandardEngine(Configuration config)
          Constructs a new standard engine.
 
Method Summary
 Package getStandardPackage()
           
 Package newPackage(java.lang.String fqn)
          Returns a package for the specified fully qualified name and nick-name.
 void setStandardPackage(Package pack)
           
 
Methods inherited from class org.millscript.millscript.vm.Engine
addInventory, addLoader, addPackage, callBinary0, callBinary1, callNullary0, callNullary1, callTrinary0, callTrinary1, callUnary0, callUnary1, fetchPackage, getConfig, getMachine, getPackage, newFunctionCall, newFunctionCall, newFunctionCall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardEngine

public StandardEngine(Configuration config)
Constructs a new standard engine.

Parameters:
config - the configuration for this standard engine
Method Detail

newPackage

public Package newPackage(java.lang.String fqn)
Description copied from class: Engine
Returns a package for the specified fully qualified name and nick-name. If a package already exists with the specified name, that package will be returned, otherwise a new empty package is created.

Overrides:
newPackage in class Engine
Parameters:
fqn - the fully qualified name for the new package.
Returns:
a new package, or the existing one, for the specified name.
See Also:
Engine.newPackage(java.lang.String)

getStandardPackage

public Package getStandardPackage()
Returns:
Returns the standardPackage.

setStandardPackage

public void setStandardPackage(Package pack)
Parameters:
pack - The standardPackage to set.


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