spring-framework / org.springframework.context.annotation / AdviceModeImportSelector / selectImports

selectImports

fun selectImports(importingClassMetadata: AnnotationMetadata): Array<String>

This implementation resolves the type of annotation from generic metadata and validates that (a) the annotation is in fact present on the importing @Configuration class and (b) that the given annotation has an advice mode attribute of type AdviceMode.

The #selectImports(AdviceMode) method is then invoked, allowing the concrete implementation to choose imports in a safe and convenient fashion.

Exceptions

IllegalArgumentException - if expected annotation A is not present on the importing @Configuration class or if #selectImports(AdviceMode) returns null