public class SimpleAutowireCandidateResolver extends java.lang.Object implements AutowireCandidateResolver
AutowireCandidateResolver
implementation to use when no annotation
support is available. This implementation checks the bean definition only.BeanDefinition.isAutowireCandidate()
Constructor and Description |
---|
SimpleAutowireCandidateResolver() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor,
java.lang.String beanName)
Build a proxy for lazy resolution of the actual dependency target,
if demanded by the injection point.
|
java.lang.Object |
getSuggestedValue(DependencyDescriptor descriptor)
Determine whether a default value is suggested for the given dependency.
|
boolean |
isAutowireCandidate(BeanDefinitionHolder bdHolder,
DependencyDescriptor descriptor)
Determine if the provided bean definition is an autowire candidate.
|
public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor)
To be considered a candidate the bean's autowire-candidate attribute must not have been set to 'false'.
isAutowireCandidate
in interface AutowireCandidateResolver
bdHolder
- the bean definition including bean name and aliasesdescriptor
- the descriptor for the target method parameter or fieldpublic java.lang.Object getSuggestedValue(DependencyDescriptor descriptor)
AutowireCandidateResolver
getSuggestedValue
in interface AutowireCandidateResolver
descriptor
- the descriptor for the target method parameter or fieldnull
if none foundpublic java.lang.Object getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, java.lang.String beanName)
AutowireCandidateResolver
getLazyResolutionProxyIfNecessary
in interface AutowireCandidateResolver
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