Class TestCaseClassLoader


  • public final class TestCaseClassLoader
    extends ClassLoader
    A custom class loader which allows to reload 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 either hardcoded in defaultExclusions, specified as property with key PROP_KEY_NO_CLS_RELOAD. in a properties file EXCLUDED_FILE that is located in the same place as the TestCaseClassLoader class.

    Known limitation:

    • the TestCaseClassLoader cannot load classes from jar files.
    • service providers must be excluded from reloading.
    Version:
    1.0
    Author:
    Ernst Reissner