ImportCandidatesTests Class — spring-boot Architecture
Architecture documentation for the ImportCandidatesTests class in ImportCandidatesTests.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/annotation/ImportCandidatesTests.java lines 35–61
class ImportCandidatesTests {
private static final String IMPORTS_FILE = "META-INF/spring/org.springframework.boot.context.annotation.ImportCandidatesTests$TestAnnotation.imports";
@Test
@WithResource(name = IMPORTS_FILE, content = """
# A comment spanning a complete line
class1
class2 # with comment at the end
# Comment with some whitespace in front
class3
""")
void loadReadsFromClasspathFile() {
ImportCandidates candidates = ImportCandidates.load(TestAnnotation.class,
Thread.currentThread().getContextClassLoader());
assertThat(candidates).containsExactly("class1", "class2", "class3");
}
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface TestAnnotation {
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free