Interface ImportSelector
- All Known Subinterfaces:
DeferredImportSelector
- All Known Implementing Classes:
AdviceModeImportSelector
,AsyncConfigurationSelector
,CachingConfigurationSelector
,TransactionManagementConfigurationSelector
public interface ImportSelector
Interface to be implemented by types that determine which @Configuration
class(es) should be imported based on a given selection criteria, usually one or more annotation attributes.An
ImportSelector
may implement any of the followingAware
interfaces, and their respective methods will be called prior toselectImports(org.springframework.core.type.AnnotationMetadata)
:ImportSelector
implementations are usually processed in the same way as regular@Import
annotations, however, it is also possible to defer selection of imports until all@Configuration
classes have been processed (seeDeferredImportSelector
for details).- Since:
- 3.1
- Author:
- Chris Beams
- See Also:
DeferredImportSelector
,Import
,ImportBeanDefinitionRegistrar
,Configuration
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
selectImports(AnnotationMetadata importingClassMetadata)
Select and return the names of which class(es) should be imported based on theAnnotationMetadata
of the importing @Configuration
class.
Method Detail
selectImports
String[] selectImports(AnnotationMetadata importingClassMetadata)
Select and return the names of which class(es) should be imported based on theAnnotationMetadata
of the importing @Configuration
class.- Returns:
- the class names, or an empty array if none