Top Description Constructors Methods
org.springframework.context.annotation

public Class ContextAnnotationAutowireCandidateResolver

extends QualifierAnnotationAutowireCandidateResolver
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.reflect.Method, java.util.Collection, .Collections, .LinkedHashSet, .List, .Map, .Set, org.springframework.aop.TargetSource, org.springframework.aop.framework.ProxyFactory, org.springframework.beans.factory.BeanFactory, .NoSuchBeanDefinitionException, org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver, org.springframework.beans.factory.config.DependencyDescriptor, org.springframework.beans.factory.support.DefaultListableBeanFactory, org.springframework.core.MethodParameter, org.springframework.core.annotation.AnnotationUtils, org.springframework.lang.Nullable, org.springframework.util.Assert

Complete implementation of the org.springframework.beans.factory.support.AutowireCandidateResolver strategy interface, providing support for qualifier annotations as well as for lazy resolution driven by the Lazy annotation in the context.annotation package.
Author
Juergen Hoeller
Since
4.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Object
private Object
buildLazyResolutionProxy(final DependencyDescriptor descriptor, final String beanName, boolean classOnly)

public Class<?>
getLazyResolutionProxyClass(DependencyDescriptor
the descriptor for the target method parameter or field
descriptor
,
String
the name of the bean that contains the injection point
beanName
)

Overrides org.springframework.beans.factory.support.SimpleAutowireCandidateResolver.getLazyResolutionProxyClass.

Overrides default org.springframework.beans.factory.support.AutowireCandidateResolver.getLazyResolutionProxyClass.

Determine the proxy class for lazy resolution of the dependency target, if demanded by the injection point.
public Object
getLazyResolutionProxyIfNecessary(DependencyDescriptor
the descriptor for the target method parameter or field
descriptor
,
String
the name of the bean that contains the injection point
beanName
)

Overrides org.springframework.beans.factory.support.SimpleAutowireCandidateResolver.getLazyResolutionProxyIfNecessary.

Overrides default org.springframework.beans.factory.support.AutowireCandidateResolver.getLazyResolutionProxyIfNecessary.

Build a proxy for lazy resolution of the actual dependency target, if demanded by the injection point.
protected boolean
Inherited from org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver:
addQualifierTypecheckQualifiercheckQualifiersextractValuefindValuegetFactoryMethodAnnotationgetQualifiedElementAnnotationgetSuggestedValuehasQualifierisAutowireCandidateisQualifierisRequiredsetValueAnnotationType

Constructor Detail

ContextAnnotationAutowireCandidateResolverback to summary
public ContextAnnotationAutowireCandidateResolver()

Method Detail

buildLazyResolutionProxyback to summary
protected Object buildLazyResolutionProxy(DependencyDescriptor descriptor, String beanName)
buildLazyResolutionProxyback to summary
private Object buildLazyResolutionProxy(final DependencyDescriptor descriptor, final String beanName, boolean classOnly)
getLazyResolutionProxyClassback to summary
public Class<?> getLazyResolutionProxyClass(DependencyDescriptor descriptor, String beanName)

Overrides org.springframework.beans.factory.support.SimpleAutowireCandidateResolver.getLazyResolutionProxyClass.

Overrides default org.springframework.beans.factory.support.AutowireCandidateResolver.getLazyResolutionProxyClass.

Doc from org.springframework.beans.factory.support.AutowireCandidateResolver.getLazyResolutionProxyClass.

Determine the proxy class for lazy resolution of the dependency target, if demanded by the injection point.

The default implementation simply returns null.

Parameters
descriptor:DependencyDescriptor

the descriptor for the target method parameter or field

beanName:String

the name of the bean that contains the injection point

Returns:Class<?>

the lazy resolution proxy class for the dependency target, if any

Annotations
@Override
@Nullable
getLazyResolutionProxyIfNecessaryback to summary
public Object getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, String beanName)

Overrides org.springframework.beans.factory.support.SimpleAutowireCandidateResolver.getLazyResolutionProxyIfNecessary.

Overrides default org.springframework.beans.factory.support.AutowireCandidateResolver.getLazyResolutionProxyIfNecessary.

Doc from org.springframework.beans.factory.support.AutowireCandidateResolver.getLazyResolutionProxyIfNecessary.

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

The default implementation simply returns null.

Parameters
descriptor:DependencyDescriptor

the descriptor for the target method parameter or field

beanName:String

the name of the bean that contains the injection point

Returns:Object

the lazy resolution proxy for the actual dependency target, or null if straight resolution is to be performed

Annotations
@Override
@Nullable
isLazyback to summary
protected boolean isLazy(DependencyDescriptor descriptor)