abstract class AnnotationConfigContextLoaderUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static Log |
logger |
Modifier | Constructor and Description |
---|---|
private |
AnnotationConfigContextLoaderUtils() |
Modifier and Type | Method and Description |
---|---|
(package private) static java.lang.Class<?>[] |
detectDefaultConfigurationClasses(java.lang.Class<?> declaringClass)
Detect the default configuration classes for the supplied test class.
|
private static boolean |
isDefaultConfigurationClassCandidate(java.lang.Class<?> clazz)
Determine if the supplied
Class meets the criteria for being
considered a default configuration class candidate. |
private static boolean |
isStaticNonPrivateAndNonFinal(java.lang.Class<?> clazz) |
private static boolean isStaticNonPrivateAndNonFinal(java.lang.Class<?> clazz)
private static boolean isDefaultConfigurationClassCandidate(java.lang.Class<?> clazz)
Class
meets the criteria for being
considered a default configuration class candidate.
Specifically, such candidates:
null
private
final
static
@Configuration
clazz
- the class to checktrue
if the supplied class meets the candidate criteriastatic java.lang.Class<?>[] detectDefaultConfigurationClasses(java.lang.Class<?> declaringClass)
The returned class array will contain all static inner classes of
the supplied class that meet the requirements for @Configuration
class implementations as specified in the documentation for
@Configuration
.
The implementation of this method adheres to the contract defined in the
SmartContextLoader
SPI. Specifically, this method uses introspection to detect default
configuration classes that comply with the constraints required of
@Configuration
class implementations. If a potential candidate
configuration class does not meet these requirements, this method will log a
warning, and the potential candidate class will be ignored.
declaringClass
- the test class that declared @ContextConfiguration
null