junit.runner
クラス TestCaseClassLoader

java.lang.Object
  拡張java.lang.ClassLoader
      拡張junit.runner.TestCaseClassLoader

public class TestCaseClassLoader
extends java.lang.ClassLoader

A custom class loader which enables the reloading of classes for each test run. The class loader can be configured with a list of package paths that should be excluded from loading. The loading of these packages is delegated to the system class loader. They will be shared across test runs.

The list of excluded package paths is specified in a properties file "excluded.properties" that is located in the same place as the TestCaseClassLoader class.

Known limitation: the TestCaseClassLoader cannot load classes from jar files.


コンストラクタの概要
TestCaseClassLoader()
          Constructs a TestCaseLoader.
TestCaseClassLoader(java.lang.String classPath)
          Constructs a TestCaseLoader.
 
メソッドの概要
 java.net.URL getResource(java.lang.String name)
           
 java.io.InputStream getResourceAsStream(java.lang.String name)
           
 boolean isExcluded(java.lang.String name)
           
 java.lang.Class loadClass(java.lang.String name, boolean resolve)
           
 
クラス java.lang.ClassLoader から継承したメソッド
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

TestCaseClassLoader

public TestCaseClassLoader()
Constructs a TestCaseLoader. It scans the class path and the excluded package paths


TestCaseClassLoader

public TestCaseClassLoader(java.lang.String classPath)
Constructs a TestCaseLoader. It scans the class path and the excluded package paths

メソッドの詳細

getResource

public java.net.URL getResource(java.lang.String name)

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String name)

isExcluded

public boolean isExcluded(java.lang.String name)

loadClass

public java.lang.Class loadClass(java.lang.String name,
                                 boolean resolve)
                          throws java.lang.ClassNotFoundException
例外:
java.lang.ClassNotFoundException


Copyright © 2001-2004 JUnit.org. All Rights Reserved.