@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 ImportSelector
protected 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
attributes
protected Class<?> getSpringFactoriesLoaderFactoryClass()
SpringFactoriesLoader
to load configuration
candidates.protected Set<String> getExclusions(AnnotationMetadata metadata, AnnotationAttributes attributes)
metadata
- the source metadataattributes
- the annotation
attributes
protected final List<String> asList(AnnotationAttributes attributes, String name)
public void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory
in interface BeanFactoryAware
BeansException
protected final ConfigurableListableBeanFactory getBeanFactory()
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
protected ClassLoader getBeanClassLoader()
public void setEnvironment(Environment environment)
setEnvironment
in interface EnvironmentAware
protected final Environment getEnvironment()
public void setResourceLoader(ResourceLoader resourceLoader)
setResourceLoader
in interface ResourceLoaderAware
protected final ResourceLoader getResourceLoader()
Copyright © 2015 Pivotal Software, Inc.. All rights reserved.