1 33 34 package edu.rice.cs.drjava.model.junit; 35 36 import edu.rice.cs.drjava.config.OptionConstants; 37 import edu.rice.cs.util.swing.ScrollableDialog; 38 import junit.runner.*; 39 40 43 public class DrJavaTestSuiteLoader implements TestSuiteLoader, OptionConstants { 44 45 private final JUnitModelCallback _jmc; 46 private TestCaseClassLoader _loader; 47 48 public DrJavaTestSuiteLoader(JUnitModelCallback jmc) { 49 _jmc = jmc; 50 String classPath = _jmc.getClassPath().toString(); 51 classPath += System.getProperty("path.separator"); 52 classPath += System.getProperty("java.class.path"); 53 _loader = new DrJavaTestCaseClassLoader(classPath); 54 } 55 56 public Class <?> load(String className) throws ClassNotFoundException { 57 return _loader.loadClass(className, true); 58 } 59 60 public Class <?> reload(Class c) throws ClassNotFoundException { 61 return load(c.getName()); 62 } 63 } 64 | Popular Tags |