spring-framework / org.springframework.beans.factory.support / AutowireCandidateResolver

AutowireCandidateResolver

interface AutowireCandidateResolver

Strategy interface for determining whether a specific bean definition qualifies as an autowire candidate for a specific dependency.

Author
Juergen Hoeller

Author
Mark Fisher

Since
2.5

Functions

getLazyResolutionProxyIfNecessary

open fun getLazyResolutionProxyIfNecessary(descriptor: DependencyDescriptor, beanName: String): Any

Build a proxy for lazy resolution of the actual dependency target, if demanded by the injection point.

The default implementation simply returns null.

getSuggestedValue

open fun getSuggestedValue(descriptor: DependencyDescriptor): Any

Determine whether a default value is suggested for the given dependency.

The default implementation simply returns null.

isAutowireCandidate

open fun isAutowireCandidate(bdHolder: BeanDefinitionHolder, descriptor: DependencyDescriptor): Boolean

Determine whether the given bean definition qualifies as an autowire candidate for the given dependency.

The default implementation checks org.springframework.beans.factory.config.BeanDefinition#isAutowireCandidate().

isRequired

open fun isRequired(descriptor: DependencyDescriptor): Boolean

Determine whether the given descriptor is effectively required.

The default implementation checks DependencyDescriptor#isRequired().

Inheritors

SimpleAutowireCandidateResolver

open class SimpleAutowireCandidateResolver : AutowireCandidateResolver

AutowireCandidateResolver implementation to use when no annotation support is available. This implementation checks the bean definition only.