1f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projectpackage junit.runner; 2f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project 3f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project/** 4f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project * A TestSuite loader that can reload classes. 5f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project */ 6f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Projectpublic class ReloadingTestSuiteLoader implements TestSuiteLoader { 7f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project 8f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project public Class load(String suiteClassName) throws ClassNotFoundException { 9f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project return createLoader().loadClass(suiteClassName, true); 10f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project } 11f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project 12f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project public Class reload(Class aClass) throws ClassNotFoundException { 13f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project return createLoader().loadClass(aClass.getName(), true); 14f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project } 15f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project 16f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project protected TestCaseClassLoader createLoader() { 17f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project return new TestCaseClassLoader(); 18f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project } 19f6c387128427e121477c1b32ad35cdcaa5101ba3The Android Open Source Project} 20