Annotation Interface CompileWithTargetClassAccess
@Retention(RUNTIME)
@Target({TYPE,METHOD})
@Documented
@ExtendWith(org.springframework.aot.test.generator.compile.CompileWithTargetClassAccessExtension.class)
public @interface CompileWithTargetClassAccess
Annotation that can be used on tests that need a
TestCompiler
with
non-public access to a target class. Allows the compiler to use
MethodHandles.privateLookupIn(java.lang.Class<?>, java.lang.invoke.MethodHandles.Lookup)
to define the
class
without polluting the test ClassLoader
.- Since:
- 6.0
- Author:
- Phillip Webb