Annotation Interface CompileWithForkedClassLoader

@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented @ExtendWith( public @interface CompileWithForkedClassLoader
Annotation that registers a JUnit Jupiter extension for test classes or test methods that need to use a forked classloader with compiled code.

The extension allows the compiler to define classes without polluting the test ClassLoader.

NOTE: this annotation cannot be used in conjunction with @TestTemplate methods. Consequently, @RepeatedTest and @ParameterizedTest methods are not supported.

Phillip Webb, Sam Brannen