类 FilteringContextCondition
java.lang.Object
cn.taketoday.context.condition.ContextCondition
cn.taketoday.context.condition.FilteringContextCondition
public abstract class FilteringContextCondition
extends ContextCondition
implements AutoConfigurationImportFilter, BeanFactoryAware, BeanClassLoaderAware
Abstract base class for a
ContextCondition that also implements
AutoConfigurationImportFilter.- 从以下版本开始:
- 4.0 2022/1/16 16:07
- 作者:
- Phillip Webb, Harry Yang
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明filter(Collection<String> classNames, FilteringContextCondition.ClassNameFilter classNameFilter, ClassLoader classLoader) protected final ClassLoaderprotected final BeanFactoryprotected abstract ConditionOutcome[]getOutcomes(String[] autoConfigurationClasses, AutoConfigurationMetadata autoConfigurationMetadata) boolean[]match(String[] autoConfigurationClasses, AutoConfigurationMetadata autoConfigurationMetadata) Apply the filter to the given auto-configuration class candidates.protected static Class<?>resolve(String className, ClassLoader classLoader) Slightly faster variant ofClassUtils.forName(String, ClassLoader)that doesn't deal with primitives, arrays or inner types.voidsetBeanClassLoader(ClassLoader classLoader) voidsetBeanFactory(BeanFactory beanFactory) 从类继承的方法 cn.taketoday.context.condition.ContextCondition
anyMatches, getMatchOutcome, logOutcome, matches, matches
-
构造器详细资料
-
FilteringContextCondition
public FilteringContextCondition()
-
-
方法详细资料
-
setBeanFactory
- 指定者:
setBeanFactory在接口中BeanFactoryAware- 抛出:
BeansException
-
getBeanFactory
-
getBeanClassLoader
-
setBeanClassLoader
- 指定者:
setBeanClassLoader在接口中BeanClassLoaderAware
-
match
public boolean[] match(String[] autoConfigurationClasses, AutoConfigurationMetadata autoConfigurationMetadata) 从接口复制的说明:AutoConfigurationImportFilterApply the filter to the given auto-configuration class candidates.- 指定者:
match在接口中AutoConfigurationImportFilter- 参数:
autoConfigurationClasses- the auto-configuration classes being considered. This array may containnullelements. Implementations should not change the values in this array.autoConfigurationMetadata- access to the meta-data generated by the auto-configure annotation processor- 返回:
- a boolean array indicating which of the auto-configuration classes should
be imported. The returned array must be the same size as the incoming
autoConfigurationClassesparameter. Entries containingfalsewill not be imported.
-
getOutcomes
protected abstract ConditionOutcome[] getOutcomes(String[] autoConfigurationClasses, AutoConfigurationMetadata autoConfigurationMetadata) -
filter
protected final List<String> filter(Collection<String> classNames, FilteringContextCondition.ClassNameFilter classNameFilter, ClassLoader classLoader) -
resolve
protected static Class<?> resolve(String className, ClassLoader classLoader) throws ClassNotFoundException Slightly faster variant ofClassUtils.forName(String, ClassLoader)that doesn't deal with primitives, arrays or inner types.- 参数:
className- the class name to resolveclassLoader- the class loader to use- 返回:
- a resolved class
- 抛出:
ClassNotFoundException- if the class cannot be found
-