org.echarts
Class MachineConstructor

java.lang.Object
  extended by org.echarts.MachineConstructor
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BasicMachineConstructor

public abstract class MachineConstructor
extends java.lang.Object
implements java.io.Serializable

An instance of this class is created for every submachine defined in a machine. For and-, or-, and dynamic machines, a MachineConstructor object is provided as State constructor parameter.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
MachineConstructor()
           
 
Method Summary
abstract  Machine newInstance(Machine parentMachine, int machineIndex, MachineCode machineCode)
          Returns a machine instance.
static Machine newInstance(java.lang.String machineClassName, java.lang.Object[] machineArgs)
          Helper method to return new machine instance using reflection.
static Machine newInstance(java.lang.String machineClassName, java.lang.Object[] machineArgs, Machine parentMachine, int machineIndex, MachineCode machineCode)
          Called by method above and by machine 'state' methods to create 'reflect' machine instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

MachineConstructor

public MachineConstructor()
Method Detail

newInstance

public static final Machine newInstance(java.lang.String machineClassName,
                                        java.lang.Object[] machineArgs)
                                 throws java.lang.Exception
Helper method to return new machine instance using reflection. Useful for creating root machine.

Throws:
java.lang.Exception

newInstance

public static final Machine newInstance(java.lang.String machineClassName,
                                        java.lang.Object[] machineArgs,
                                        Machine parentMachine,
                                        int machineIndex,
                                        MachineCode machineCode)
                                 throws java.lang.Exception
Called by method above and by machine 'state' methods to create 'reflect' machine instances.

Throws:
java.lang.Exception

newInstance

public abstract Machine newInstance(Machine parentMachine,
                                    int machineIndex,
                                    MachineCode machineCode)
                             throws java.lang.Exception
Returns a machine instance. Overridden by subclass defined by host language translator. Called by Machine.createSubmachine().

Throws:
java.lang.Exception