Class ContextAnnotationAutowireCandidateResolver
- java.lang.Object
- org.springframework.beans.factory.support.SimpleAutowireCandidateResolver
- org.springframework.beans.factory.support.GenericTypeAwareAutowireCandidateResolver
- org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver
- org.springframework.context.annotation.ContextAnnotationAutowireCandidateResolver
- All Implemented Interfaces:
Aware,BeanFactoryAware,AutowireCandidateResolver
public class ContextAnnotationAutowireCandidateResolver extends QualifierAnnotationAutowireCandidateResolver
Complete implementation of theAutowireCandidateResolverstrategy interface, providing support for qualifier annotations as well as for lazy resolution driven by theLazyannotation in thecontext.annotationpackage.- Since:
- 4.0
- Author:
- Juergen Hoeller
Constructor Summary
Constructors Constructor Description ContextAnnotationAutowireCandidateResolver()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectbuildLazyResolutionProxy(DependencyDescriptor descriptor, String beanName)ObjectgetLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, String beanName)Build a proxy for lazy resolution of the actual dependency target, if demanded by the injection point.protected booleanisLazy(DependencyDescriptor descriptor)Methods inherited from class org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver
addQualifierType, checkQualifier, checkQualifiers, extractValue, findValue, getFactoryMethodAnnotation, getQualifiedElementAnnotation, getSuggestedValue, isAutowireCandidate, isQualifier, isRequired, setValueAnnotationType
Methods inherited from class org.springframework.beans.factory.support.GenericTypeAwareAutowireCandidateResolver
checkGenericTypeMatch, getBeanFactory, getResolvedDecoratedDefinition, getReturnTypeForFactoryMethod, setBeanFactory
Constructor Detail
ContextAnnotationAutowireCandidateResolver
public ContextAnnotationAutowireCandidateResolver()
Method Detail
getLazyResolutionProxyIfNecessary
public Object getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, String beanName)
Description copied from interface:AutowireCandidateResolverBuild a proxy for lazy resolution of the actual dependency target, if demanded by the injection point.- Specified by:
getLazyResolutionProxyIfNecessaryin interfaceAutowireCandidateResolver- Overrides:
getLazyResolutionProxyIfNecessaryin classSimpleAutowireCandidateResolver- Parameters:
descriptor- the descriptor for the target method parameter or fieldbeanName- the name of the bean that contains the injection point- Returns:
- the lazy resolution proxy for the actual dependency target, or
nullif straight resolution is to be performed
isLazy
protected boolean isLazy(DependencyDescriptor descriptor)
buildLazyResolutionProxy
protected Object buildLazyResolutionProxy(DependencyDescriptor descriptor, String beanName)