edu.rice.cs.drjava.model.repl.newjvm
Interface InterpreterJVMRemoteI

All Superinterfaces:
Remote, SlaveRemote
All Known Implementing Classes:
InterpreterJVM

public interface InterpreterJVMRemoteI
extends SlaveRemote

This interface specifies the methods that the interpreter JVM exposes for the MainJVM to call.

Version:
$Id: InterpreterJVMRemoteI.java 4591 2008-07-17 19:03:34Z rcartwright $

Method Summary
 void addBuildDirectoryClassPath(File f)
          Adds the given path to the classpath shared by ALL Java interpreters.
 void addExternalFilesClassPath(File f)
          Adds the given path to the classpath shared by ALL Java interpreters.
 void addExtraClassPath(File f)
          Adds the given path to the classpath shared by ALL Java interpreters.
 void addInterpreter(String name)
          Adds a named Interpreter to the list.
 void addProjectClassPath(File f)
          Adds the given path to the classpath shared by ALL Java interpreters.
 void addProjectFilesClassPath(File f)
          Adds the given path to the classpath shared by ALL Java interpreters.
 List<String> findTestClasses(List<String> classNames, List<File> files)
           
 List<File> getClassPath()
          Returns the current class path.
 String getVariableToString(String var)
          Gets the string representation of the value of a variable in the current interpreter.
 String getVariableType(String var)
          Gets the type of a variable in the current interpreter.
 InterpretResult interpret(String s)
          Interprets the given string of source code in the active interpreter.
 void removeInterpreter(String name)
          Removes the interpreter with the given name, if it exists.
 boolean runTestSuite()
           
 boolean setActiveInterpreter(String name)
          Sets the current interpreter to be the one specified by the given name
 void setPrivateAccessible(boolean allow)
          Sets whether to allow private access.
 void setShowMessageOnResetFailure(boolean show)
           
 boolean setToDefaultInterpreter()
          Sets the default interpreter to be active.
 
Methods inherited from interface edu.rice.cs.util.newjvm.SlaveRemote
quit, start
 

Method Detail

findTestClasses

List<String> findTestClasses(List<String> classNames,
                             List<File> files)
                             throws RemoteException
Throws:
RemoteException

runTestSuite

boolean runTestSuite()
                     throws RemoteException
Throws:
RemoteException

setShowMessageOnResetFailure

void setShowMessageOnResetFailure(boolean show)
                                  throws RemoteException
Parameters:
show - Whether to show a message if a reset operation fails.
Throws:
RemoteException

setPrivateAccessible

void setPrivateAccessible(boolean allow)
                          throws RemoteException
Sets whether to allow private access.

Throws:
RemoteException

addInterpreter

void addInterpreter(String name)
                    throws RemoteException
Adds a named Interpreter to the list.

Parameters:
name - the unique name for the interpreter
Throws:
IllegalArgumentException - if the name is not unique
RemoteException

removeInterpreter

void removeInterpreter(String name)
                       throws RemoteException
Removes the interpreter with the given name, if it exists.

Parameters:
name - Name of the interpreter to remove
Throws:
RemoteException

setActiveInterpreter

boolean setActiveInterpreter(String name)
                             throws RemoteException
Sets the current interpreter to be the one specified by the given name

Parameters:
name - the unique name of the interpreter to set active
Returns:
Whether the new interpreter is currently in progress with an interaction
Throws:
RemoteException

setToDefaultInterpreter

boolean setToDefaultInterpreter()
                                throws RemoteException
Sets the default interpreter to be active.

Returns:
Whether the new interpreter is currently in progress with an interaction
Throws:
RemoteException

interpret

InterpretResult interpret(String s)
                          throws RemoteException
Interprets the given string of source code in the active interpreter. The result is returned to MainJVMRemoteI via the interpretResult method.

Parameters:
s - Source code to interpret.
Throws:
RemoteException

getVariableToString

String getVariableToString(String var)
                           throws RemoteException
Gets the string representation of the value of a variable in the current interpreter.

Parameters:
var - the name of the variable
Returns:
null if the variable is not defined, "null" if the value is null; otherwise, its string representation
Throws:
RemoteException

getVariableType

String getVariableType(String var)
                       throws RemoteException
Gets the type of a variable in the current interpreter.

Parameters:
var - the name of the variable
Throws:
RemoteException

getClassPath

List<File> getClassPath()
                        throws RemoteException
Returns the current class path. (List rather than Iterable to avoid conflicts between RMI and Retroweaver.)

Throws:
RemoteException

addProjectClassPath

void addProjectClassPath(File f)
                         throws RemoteException
Adds the given path to the classpath shared by ALL Java interpreters. Only unique paths are added.

Parameters:
f - Entry to add to the accumulated classpath
Throws:
RemoteException

addBuildDirectoryClassPath

void addBuildDirectoryClassPath(File f)
                                throws RemoteException
Adds the given path to the classpath shared by ALL Java interpreters. Only unique paths are added.

Parameters:
f - Entry to add to the accumulated classpath
Throws:
RemoteException

addProjectFilesClassPath

void addProjectFilesClassPath(File f)
                              throws RemoteException
Adds the given path to the classpath shared by ALL Java interpreters. Only unique paths are added.

Parameters:
f - Entry to add to the accumulated classpath
Throws:
RemoteException

addExternalFilesClassPath

void addExternalFilesClassPath(File f)
                               throws RemoteException
Adds the given path to the classpath shared by ALL Java interpreters. Only unique paths are added.

Parameters:
f - Entry to add to the accumulated classpath
Throws:
RemoteException

addExtraClassPath

void addExtraClassPath(File f)
                       throws RemoteException
Adds the given path to the classpath shared by ALL Java interpreters. Only unique paths are added.

Parameters:
f - Entry to add to the accumulated classpath
Throws:
RemoteException