public interface AutowireCandidateResolver
| Modifier and Type | Method and Description |
|---|---|
default Object |
getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor,
String beanName)
Build a proxy for lazy resolution of the actual dependency target,
if demanded by the injection point.
|
default Object |
getSuggestedValue(DependencyDescriptor descriptor)
Determine whether a default value is suggested for the given dependency.
|
default boolean |
hasQualifier(DependencyDescriptor descriptor)
Determine whether the given descriptor declares a qualifier beyond the type
(typically - but not necessarily - a specific kind of annotation).
|
default boolean |
isAutowireCandidate(BeanDefinitionHolder bdHolder,
DependencyDescriptor descriptor)
Determine whether the given bean definition qualifies as an
autowire candidate for the given dependency.
|
default boolean |
isRequired(DependencyDescriptor descriptor)
Determine whether the given descriptor is effectively required.
|
default boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor)
The default implementation checks
BeanDefinition.isAutowireCandidate().
bdHolder - the bean definition including bean name and aliasesdescriptor - the descriptor for the target method parameter or fieldBeanDefinition.isAutowireCandidate()default boolean isRequired(DependencyDescriptor descriptor)
The default implementation checks DependencyDescriptor.isRequired().
descriptor - the descriptor for the target method parameter or fieldDependencyDescriptor.isRequired()default boolean hasQualifier(DependencyDescriptor descriptor)
The default implementation returns false.
descriptor - the descriptor for the target method parameter or fieldQualifierAnnotationAutowireCandidateResolver.hasQualifier(org.springframework.beans.factory.config.DependencyDescriptor)@Nullable default Object getSuggestedValue(DependencyDescriptor descriptor)
The default implementation simply returns null.
descriptor - the descriptor for the target method parameter or fieldnull if none found@Nullable default Object getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, @Nullable String beanName)
The default implementation simply returns null.
descriptor - the descriptor for the target method parameter or fieldbeanName - the name of the bean that contains the injection pointnull if straight resolution is to be performed