类 AutoConfigurationImportSelector

java.lang.Object
cn.taketoday.context.annotation.config.AutoConfigurationImportSelector
所有已实现的接口:
Aware, BeanClassLoaderAware, BeanFactoryAware, DeferredImportSelector, EnvironmentAware, ResourceLoaderAware, ImportSelector, cn.taketoday.core.Ordered
直接已知子类:
ImportAutoConfigurationImportSelector

public class AutoConfigurationImportSelector extends Object implements DeferredImportSelector, BeanClassLoaderAware, ResourceLoaderAware, BeanFactoryAware, EnvironmentAware, cn.taketoday.core.Ordered
DeferredImportSelector to handle auto-configuration. This class can also be subclassed if a custom variant of @EnableAutoConfiguration is needed.
从以下版本开始:
4.0 2022/2/1 02:37
作者:
Phillip Webb, Andy Wilkinson, Stephane Nicoll, Madhura Bhave, Harry Yang
另请参阅:
  • 构造器详细资料

    • AutoConfigurationImportSelector

      public AutoConfigurationImportSelector()
  • 方法详细资料

    • selectImports

      public String[] selectImports(cn.taketoday.core.type.AnnotationMetadata annotationMetadata)
      从接口复制的说明: ImportSelector
      Select and return the names of which class(es) should be imported based on the AnnotationMetadata of the importing @Configuration class.
      指定者:
      selectImports 在接口中 ImportSelector
      返回:
      the class names, or an empty array if none
    • getExclusionFilter

      public Predicate<String> getExclusionFilter()
      从接口复制的说明: ImportSelector
      Return a predicate for excluding classes from the import candidates, to be transitively applied to all classes found through this selector's imports.

      If this predicate returns true for a given fully-qualified class name, said class will not be considered as an imported configuration class, bypassing class file loading as well as metadata introspection.

      指定者:
      getExclusionFilter 在接口中 ImportSelector
      返回:
      the filter predicate for fully-qualified candidate class names of transitively imported configuration classes, or null if none
    • getAutoConfigurationEntry

      protected AutoConfigurationImportSelector.AutoConfigurationEntry getAutoConfigurationEntry(cn.taketoday.core.type.AnnotationMetadata annotationMetadata)
      Return the AutoConfigurationImportSelector.AutoConfigurationEntry based on the AnnotationMetadata of the importing @Configuration class.
      参数:
      annotationMetadata - the annotation metadata of the configuration class
      返回:
      the auto-configurations that should be imported
    • getImportGroup

      public Class<? extends DeferredImportSelector.Group> getImportGroup()
      从接口复制的说明: DeferredImportSelector
      Return a specific import group.

      The default implementations return null for no grouping required.

      指定者:
      getImportGroup 在接口中 DeferredImportSelector
      返回:
      the import group class, or null if none
    • isEnabled

      protected boolean isEnabled(cn.taketoday.core.type.AnnotationMetadata metadata)
    • getAttributes

      @Nullable protected cn.taketoday.core.annotation.AnnotationAttributes getAttributes(cn.taketoday.core.type.AnnotationMetadata metadata)
      Return the appropriate AnnotationAttributes from the AnnotationMetadata. By default this method will return attributes for getAnnotationClass().
      参数:
      metadata - the annotation metadata
      返回:
      annotation attributes
    • getAnnotationClass

      protected Class<?> getAnnotationClass()
      Return the source annotation class used by the selector.
      返回:
      the annotation class
    • getCandidateConfigurations

      protected List<String> getCandidateConfigurations(cn.taketoday.core.type.AnnotationMetadata metadata, @Nullable cn.taketoday.core.annotation.AnnotationAttributes attributes)
      Return the auto-configuration class names that should be considered. By default this method will load candidates using TodayStrategies with getStrategyClass().
      参数:
      metadata - the source metadata
      attributes - the annotation attributes
      返回:
      a list of candidate configurations
    • getStrategyClass

      protected Class<?> getStrategyClass()
      Return the class used by TodayStrategies to load configuration candidates.
      返回:
      the strategy class
    • handleInvalidExcludes

      protected void handleInvalidExcludes(List<String> invalidExcludes)
      Handle any invalid excludes that have been specified.
      参数:
      invalidExcludes - the list of invalid excludes (will always have at least one element)
    • getExclusions

      protected Set<String> getExclusions(cn.taketoday.core.type.AnnotationMetadata metadata, @Nullable cn.taketoday.core.annotation.AnnotationAttributes attributes)
      Return any exclusions that limit the candidate configurations.
      参数:
      metadata - the source metadata
      attributes - the annotation attributes
      返回:
      exclusions or an empty set
    • getExcludeAutoConfigurationsProperty

      protected List<String> getExcludeAutoConfigurationsProperty()
      Returns the auto-configurations excluded by the context.autoconfigure.exclude property.
      返回:
      excluded auto-configurations
    • getAutoConfigurationImportFilters

      protected List<AutoConfigurationImportFilter> getAutoConfigurationImportFilters()
    • removeDuplicates

      protected final <T> List<T> removeDuplicates(List<T> list)
    • asList

      protected final List<String> asList(cn.taketoday.core.annotation.AnnotationAttributes attributes, String name)
    • getAutoConfigurationImportListeners

      protected List<AutoConfigurationImportListener> getAutoConfigurationImportListeners()
    • setBeanFactory

      public void setBeanFactory(BeanFactory beanFactory) throws BeansException
      指定者:
      setBeanFactory 在接口中 BeanFactoryAware
      抛出:
      BeansException
    • getBeanFactory

      protected final ConfigurableBeanFactory getBeanFactory()
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader classLoader)
      指定者:
      setBeanClassLoader 在接口中 BeanClassLoaderAware
    • getBeanClassLoader

      protected ClassLoader getBeanClassLoader()
    • setEnvironment

      public void setEnvironment(cn.taketoday.core.env.Environment environment)
      指定者:
      setEnvironment 在接口中 EnvironmentAware
    • getEnvironment

      protected final cn.taketoday.core.env.Environment getEnvironment()
    • setResourceLoader

      public void setResourceLoader(cn.taketoday.core.io.ResourceLoader resourceLoader)
      从接口复制的说明: ResourceLoaderAware
      Set the ResourceLoader that this object runs in.

      This might be a ResourcePatternResolver, which can be checked through instanceof ResourcePatternResolver. See also the ResourcePatternUtils.getResourcePatternResolver method.

      Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked before ApplicationContextAware's setApplicationContext.

      指定者:
      setResourceLoader 在接口中 ResourceLoaderAware
      参数:
      resourceLoader - the ResourceLoader object to be used by this object
      另请参阅:
      • PatternResourceLoader
      • PatternResourceLoader.fromResourceLoader(cn.taketoday.core.io.ResourceLoader)
    • getResourceLoader

      protected final cn.taketoday.core.io.ResourceLoader getResourceLoader()
    • getOrder

      public int getOrder()
      指定者:
      getOrder 在接口中 cn.taketoday.core.Ordered