Class AotTestContextInitializers
java.lang.Object
org.springframework.test.context.aot.AotTestContextInitializers
AotTestContextInitializers
provides mappings from test classes to
AOT-optimized context initializers.
Intended solely for internal use within the framework.
If we are not running in AOT mode or if a test class is not supported in AOT mode, getContextInitializer(Class)
will return
null
.
- Since:
- 6.0
- Author:
- Sam Brannen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetContextInitializer
(Class<?> testClass) Get the AOTApplicationContextInitializer
for the specified test class.boolean
isSupportedTestClass
(Class<?> testClass) Determine if the specified test class has an AOT-optimized application context initializer.
-
Constructor Details
-
AotTestContextInitializers
public AotTestContextInitializers()
-
-
Method Details
-
isSupportedTestClass
Determine if the specified test class has an AOT-optimized application context initializer.If this method returns
true
,getContextInitializer(Class)
should not returnnull
. -
getContextInitializer
@Nullable public ApplicationContextInitializer<ConfigurableApplicationContext> getContextInitializer(Class<?> testClass) Get the AOTApplicationContextInitializer
for the specified test class.- Returns:
- the AOT context initializer, or
null
if there is no AOT context initializer for the specified test class - See Also:
-