edu.rice.cs.drjava.model.repl
Class DynamicJavaAdapter

java.lang.Object
  |
  +--edu.rice.cs.drjava.model.repl.DynamicJavaAdapter
All Implemented Interfaces:
JavaInterpreter

public class DynamicJavaAdapter
extends Object
implements JavaInterpreter

An implementation of the interpreter for the repl pane.

Version:
$Id: DynamicJavaAdapter.java,v 1.31 2002/08/23 15:52:33 csreis Exp $

Inner Class Summary
static class DynamicJavaAdapter.ClassLoaderExtension
          A class loader for the interpreter.
static class DynamicJavaAdapter.InterpreterExtension
          An extension of DynamicJava's interpreter that makes sure classes are not loaded by the system class loader (when possible) so that future interpreters will be able to reload the classes.
 
Field Summary
private  Interpreter _djInterpreter
           
 
Fields inherited from interface edu.rice.cs.drjava.model.repl.JavaInterpreter
NO_RESULT
 
Constructor Summary
DynamicJavaAdapter()
          Constructor.
 
Method Summary
 void addClassPath(String path)
          Adds a path to the current classpath.
 Object interpret(String s)
          Interprets a string as Java source.
 void setPackageScope(String packageName)
          Set the scope for unqualified names to the given package.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

_djInterpreter

private Interpreter _djInterpreter
Constructor Detail

DynamicJavaAdapter

public DynamicJavaAdapter()
Constructor.
Method Detail

interpret

public Object interpret(String s)
                 throws ExceptionReturnedException
Interprets a string as Java source.
Specified by:
interpret in interface JavaInterpreter
Parameters:
s - the string to interpret
Returns:
the Object generated by the running of s

addClassPath

public void addClassPath(String path)
Adds a path to the current classpath.
Specified by:
addClassPath in interface JavaInterpreter
Parameters:
path - the path to add

setPackageScope

public void setPackageScope(String packageName)
Set the scope for unqualified names to the given package.
Specified by:
setPackageScope in interface JavaInterpreter
Parameters:
packageName - Package to assume scope of.