| edu.rice.cs.drjava.model.junit.DrJavaTestCaseClassLoader
DrJavaTestCaseClassLoader | final public class DrJavaTestCaseClassLoader extends TestCaseClassLoader (Code) | | A custom classloader for use in running test cases. this will load all classes for the test case. This loader also
provides an excludes list. any class that matches an entry in the list will be loaded by the system class loader
instead.
This class extends junit.runner.TestCaseClassLoader. however, since the junit version kept all non public code as private, we
had to duplicate the class to add the features we need.
getResource and getResourceAsStream will not defer to the system class loader, as the junit version does, but instead will use
the custom internal classpath to get resources.
This allows this class to be used an a remote classloader to test cases that spawn multiple jvms.
|
EXCLUDED_FILE | final static String EXCLUDED_FILE(Code) | | Name of excluded properties file
|
_loader | ClassLoader _loader(Code) | | the class loader that will load from the custom inner classpath
|
DrJavaTestCaseClassLoader | public DrJavaTestCaseClassLoader()(Code) | | Constructs a TestCaseLoader. It scans the class path and the excluded package paths.
|
DrJavaTestCaseClassLoader | public DrJavaTestCaseClassLoader(String classPath)(Code) | | Constructs a TestCaseLoader. It scans the class path and the excluded package paths.
|
getResource | public URL getResource(String name)(Code) | | Gets a resource from the custom classpath.
|
getResourceAsStream | public InputStream getResourceAsStream(String name)(Code) | | Gets a resource stream from the custom classpath.
|
isExcluded | public boolean isExcluded(String name)(Code) | | Teturns true if the classname should be excluded
(loaded from system), false otherwise
|
loadClass | public synchronized Class> loadClass(String name, boolean resolve) throws ClassNotFoundException(Code) | | Loads the class. 1st. checks if the class is already loaded. 2nd. checks if it should be loaded by system.
3rd. try to load the class myself
|
|
|