@Order(value=2147483646) public class EnableAutoConfigurationImportSelector extends Object implements DeferredImportSelector, BeanClassLoaderAware, ResourceLoaderAware, BeanFactoryAware, EnvironmentAware
DeferredImportSelector to handle auto-configuration. This class can also be subclassed if a custom variant of
@EnableAutoConfiguration. is needed.EnableAutoConfiguration| Constructor and Description |
|---|
EnableAutoConfigurationImportSelector() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
asList(AnnotationAttributes attributes,
String name) |
protected Class<?> |
getAnnotationClass()
Return the source annotation class used by the selector.
|
protected AnnotationAttributes |
getAttributes(AnnotationMetadata metadata)
Return the appropriate
AnnotationAttributes from the
AnnotationMetadata. |
protected ClassLoader |
getBeanClassLoader() |
protected ConfigurableListableBeanFactory |
getBeanFactory() |
protected List<String> |
getCandidateConfigurations(AnnotationMetadata metadata,
AnnotationAttributes attributes)
Return the auto-configuration class names that should be considered.
|
protected Environment |
getEnvironment() |
protected Set<String> |
getExclusions(AnnotationMetadata metadata,
AnnotationAttributes attributes)
Return any exclusions that limit the candidate configurations.
|
protected ResourceLoader |
getResourceLoader() |
protected Class<?> |
getSpringFactoriesLoaderFactoryClass()
Return the class used by
SpringFactoriesLoader to load configuration
candidates. |
protected <T> List<T> |
removeDuplicates(List<T> list) |
String[] |
selectImports(AnnotationMetadata metadata) |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setBeanFactory(BeanFactory beanFactory) |
void |
setEnvironment(Environment environment) |
void |
setResourceLoader(ResourceLoader resourceLoader) |
public EnableAutoConfigurationImportSelector()
public String[] selectImports(AnnotationMetadata metadata)
selectImports in interface ImportSelectorprotected AnnotationAttributes getAttributes(AnnotationMetadata metadata)
AnnotationAttributes from the
AnnotationMetadata. By default this method will return attributes for
getAnnotationClass().metadata - the annotation metadataprotected Class<?> getAnnotationClass()
protected List<String> getCandidateConfigurations(AnnotationMetadata metadata, AnnotationAttributes attributes)
SpringFactoriesLoader with
getSpringFactoriesLoaderFactoryClass().metadata - the source metadataattributes - the annotation
attributesprotected Class<?> getSpringFactoriesLoaderFactoryClass()
SpringFactoriesLoader to load configuration
candidates.protected Set<String> getExclusions(AnnotationMetadata metadata, AnnotationAttributes attributes)
metadata - the source metadataattributes - the annotation
attributesprotected final List<String> asList(AnnotationAttributes attributes, String name)
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory in interface BeanFactoryAwareBeansExceptionprotected final ConfigurableListableBeanFactory getBeanFactory()
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwareprotected ClassLoader getBeanClassLoader()
public void setEnvironment(Environment environment)
setEnvironment in interface EnvironmentAwareprotected final Environment getEnvironment()
public void setResourceLoader(ResourceLoader resourceLoader)
setResourceLoader in interface ResourceLoaderAwareprotected final ResourceLoader getResourceLoader()
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.