代码拉取完成,页面将自动刷新
同步操作将从 huifer/Code-Analysis 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
类全路径: org.springframework.beans.factory.support.AutowireCandidateResolver
接口作用: 注入候选对象选择器
作为接口在这里我们仅需要了解其方法的作用, 或者方法的能力. 至于实现可以到子类中进行阅读
public interface AutowireCandidateResolver {
/**
* Determine whether the given bean definition qualifies as an
* autowire candidate for the given dependency.
* <p>The default implementation checks
* {@link org.springframework.beans.factory.config.BeanDefinition#isAutowireCandidate()}.
*
* 是否是自动注入的候选者
* @param bdHolder the bean definition including bean name and aliases
* @param descriptor the descriptor for the target method parameter or field
* @return whether the bean definition qualifies as autowire candidate
* @see org.springframework.beans.factory.config.BeanDefinition#isAutowireCandidate()
*/
default boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor) {
return bdHolder.getBeanDefinition().isAutowireCandidate();
}
/**
* Determine whether the given descriptor is effectively required.
* <p>The default implementation checks {@link DependencyDescriptor#isRequired()}.
* 是否必须
* @param descriptor the descriptor for the target method parameter or field
* @return whether the descriptor is marked as required or possibly indicating
* non-required status some other way (e.g. through a parameter annotation)
* @since 5.0
* @see DependencyDescriptor#isRequired()
*/
default boolean isRequired(DependencyDescriptor descriptor) {
return descriptor.isRequired();
}
/**
* Determine whether the given descriptor declares a qualifier beyond the type
* (typically - but not necessarily - a specific kind of annotation).
* <p>The default implementation returns {@code false}.
*
* 以来描述符是否存在对应的对象
* @param descriptor the descriptor for the target method parameter or field
* @return whether the descriptor declares a qualifier, narrowing the candidate
* status beyond the type match
* @since 5.1
* @see org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver#hasQualifier
*/
default boolean hasQualifier(DependencyDescriptor descriptor) {
return false;
}
/**
* Determine whether a default value is suggested for the given dependency.
* <p>The default implementation simply returns {@code null}.
*
* 获取数据(可能存在默认值)
* @param descriptor the descriptor for the target method parameter or field
* @return the value suggested (typically an expression String),
* or {@code null} if none found
* @since 3.0
*/
@Nullable
default Object getSuggestedValue(DependencyDescriptor descriptor) {
return null;
}
/**
* Build a proxy for lazy resolution of the actual dependency target,
* if demanded by the injection point.
* <p>The default implementation simply returns {@code null}.
*
* 延迟加载对象
* @param descriptor the descriptor for the target method parameter or field
* @param beanName the name of the bean that contains the injection point
* @return the lazy resolution proxy for the actual dependency target,
* or {@code null} if straight resolution is to be performed
* @since 4.0
*/
@Nullable
default Object getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, @Nullable String beanName) {
return null;
}
}
在了解接口作用后下面是对实现类的分析
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。