The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | package junit.runner; |
| 2 | |
| 3 | /** |
| 4 | * A TestSuite loader that can reload classes. |
| 5 | * {@hide} - Not needed for 1.0 SDK |
| 6 | */ |
| 7 | public class ReloadingTestSuiteLoader implements TestSuiteLoader { |
Brett Chabot | f1253cd | 2012-01-30 11:29:54 -0800 | [diff] [blame] | 8 | |
| 9 | public Class load(String suiteClassName) throws ClassNotFoundException { |
| 10 | return createLoader().loadClass(suiteClassName, true); |
| 11 | } |
| 12 | |
| 13 | public Class reload(Class aClass) throws ClassNotFoundException { |
| 14 | return createLoader().loadClass(aClass.getName(), true); |
| 15 | } |
| 16 | |
| 17 | protected TestCaseClassLoader createLoader() { |
| 18 | return new TestCaseClassLoader(); |
| 19 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 20 | } |