org.rosuda.REngine
Class REngine

java.lang.Object
  extended by org.rosuda.REngine.REngine

public abstract class REngine
extends Object


Field Summary
protected static REngine lastEngine
          last created engine or null if there is none
 
Constructor Summary
REngine()
           
 
Method Summary
abstract  void assign(String symbol, REXP value, REXP env)
           
static REngine engineForClass(String klass)
          this is the designated constructor for REngine classes.
 REXP eval(String cmd)
           
abstract  REXP eval(String cmd, boolean copy)
           
abstract  REXP eval(String cmd, REXP[] args)
           
abstract  REXP get(String symbol, REXP env)
           
static REngine getLastEngine()
          retrieve the last created engine
 void voidEval(String cmd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastEngine

protected static REngine lastEngine
last created engine or null if there is none

Constructor Detail

REngine

public REngine()
Method Detail

engineForClass

public static REngine engineForClass(String klass)
                              throws ClassNotFoundException,
                                     NoSuchMethodException,
                                     IllegalAccessException,
                                     InvocationTargetException
this is the designated constructor for REngine classes. It uses reflection to call createEngine method on the given REngine class.

Parameters:
klass - fully qualified class-name of a REngine implementation
Returns:
REngine implementation or null if createEngine invokation failed
Throws:
ClassNotFoundException
NoSuchMethodException
IllegalAccessException
InvocationTargetException

getLastEngine

public static REngine getLastEngine()
retrieve the last created engine

Returns:
last created engine or null if no engine was created yet

eval

public abstract REXP eval(String cmd,
                          boolean copy)
                   throws REngineException
Throws:
REngineException

eval

public abstract REXP eval(String cmd,
                          REXP[] args)
                   throws REngineException
Throws:
REngineException

assign

public abstract void assign(String symbol,
                            REXP value,
                            REXP env)
                     throws REngineException
Throws:
REngineException

get

public abstract REXP get(String symbol,
                         REXP env)
                  throws REngineException
Throws:
REngineException

eval

public REXP eval(String cmd)
          throws REngineException
Throws:
REngineException

voidEval

public void voidEval(String cmd)
              throws REngineException
Throws:
REngineException