ConForM.CoopnTools.JavaProto.Interpretor
Class Interpretor

java.lang.Object
  |
  +--ConForM.CoopnTools.JavaProto.Interpretor.Interpretor
All Implemented Interfaces:
CoopnTool, java.lang.Runnable

public class Interpretor
extends java.lang.Object
implements CoopnTool

CO-OPN JavaPrototype Interpretor. This tool allows to execute generated code. It is composed of a constructor, building the interpretor, by a method run, implementing the tool itself, and a method main. Hence, an interpretor can be started either from a command line, or by another CoopnTool. In this case, an interpretor is likely to by started as a new thread.

See Also:
run

Field Summary
static java.lang.String TOOL
          Interpretor tool name.
static java.lang.String VERSION
          Interpretor version.
 
Constructor Summary
protected Interpretor(InterpretorEnv env, InterpretorEnvMgr envMgr)
          Simple constructor.
 
Method Summary
 CoopnEnv getEnv()
          Get the environment.
static Interpretor getTool(CoopnEnv env)
          Creates a new interpretor, based on an existing environment, or null if the tool cannot be created.
static Interpretor getTool(InterpretorEnv env)
          Creates a new interpretor, based on an existing environment, or null if the tool cannot be created.
static void main(java.lang.String[] args)
          Main program.
 void run()
          Implementation of the interpretor
 void show()
          Show the tool's window, if the tool has its own GUI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
Interpretor version.

TOOL

public static final java.lang.String TOOL
Interpretor tool name.
Constructor Detail

Interpretor

protected Interpretor(InterpretorEnv env,
                      InterpretorEnvMgr envMgr)
Simple constructor.
Parameters:
env - the simple CoopnTools environment
Method Detail

getTool

public static Interpretor getTool(CoopnEnv env)
Creates a new interpretor, based on an existing environment, or null if the tool cannot be created.

getTool

public static Interpretor getTool(InterpretorEnv env)
Creates a new interpretor, based on an existing environment, or null if the tool cannot be created.

getEnv

public CoopnEnv getEnv()
Get the environment.
Specified by:
getEnv in interface CoopnTool

show

public void show()
Show the tool's window, if the tool has its own GUI. Do nothing else.
Specified by:
show in interface CoopnTool

run

public void run()
Implementation of the interpretor
Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] args)
Main program. This method creates a new environment from the command line, creates a new interpretor according to the environment, and call its run method.