接口 ImportSelector

所有已知子接口:
AnnotationImportSelector<A>, DeferredImportSelector
所有已知实现类:
AdviceModeImportSelector, AsyncConfigurationSelector, AutoConfigurationImportSelector, CachingConfigurationSelector, ImportAutoConfigurationImportSelector
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface 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 following Aware interfaces, and their respective methods will be called prior to selectImports(cn.taketoday.core.type.AnnotationMetadata):

Alternatively, the class may provide a single constructor with one or more of the following supported parameter types:

作者:
Chris Beams, Juergen Hoeller, TODAY 2019-10-01 20:20
另请参阅:
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final String[]
     
  • 方法概要

    修饰符和类型
    方法
    说明
    default Predicate<String>
    Return a predicate for excluding classes from the import candidates, to be transitively applied to all classes found through this selector's imports.
    selectImports(cn.taketoday.core.type.AnnotationMetadata importingClassMetadata)
    Select and return the names of which class(es) should be imported based on the AnnotationMetadata of the importing @Configuration class.
  • 字段详细资料

    • NO_IMPORTS

      static final String[] NO_IMPORTS
  • 方法详细资料

    • selectImports

      String[] selectImports(cn.taketoday.core.type.AnnotationMetadata importingClassMetadata)
      Select and return the names of which class(es) should be imported based on the AnnotationMetadata of the importing @Configuration class.
      返回:
      the class names, or an empty array if none
    • getExclusionFilter

      @Nullable default Predicate<String> getExclusionFilter()
      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.

      返回:
      the filter predicate for fully-qualified candidate class names of transitively imported configuration classes, or null if none
      从以下版本开始:
      4.0