Annotation Interface CompileWithTargetClassAccess
@Retention(RUNTIME)
@Target({TYPE,METHOD})
@Documented
@ExtendWith(org.springframework.aot.test.generate.compile.CompileWithTargetClassAccessExtension.class)
public @interface CompileWithTargetClassAccess
Annotation that registers a JUnit Jupiter extension for test classes or test
methods that need a
TestCompiler
with non-public access to target
classes.
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.
- Since:
- 6.0
- Author:
- Phillip Webb, Sam Brannen