open class ContextAnnotationAutowireCandidateResolver : QualifierAnnotationAutowireCandidateResolver
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
ContextAnnotationAutowireCandidateResolver()
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 |
open fun getLazyResolutionProxyIfNecessary(descriptor: DependencyDescriptor, beanName: String): Any |
open fun addQualifierType(qualifierType: Class<out Annotation>): Unit
Register the given type to be used as a qualifier when autowiring. This identifies qualifier annotations for direct use (on fields, method parameters and constructor parameters) as well as meta annotations that in turn identify actual qualifier annotations. This implementation only supports annotations as qualifier types. The default is Spring's Qualifier annotation which serves as a qualifier for direct use and also as a meta annotation. |
|
open fun getSuggestedValue(descriptor: DependencyDescriptor): Any
Determine whether the given dependency declares a value annotation. |
|
open fun isAutowireCandidate(bdHolder: BeanDefinitionHolder, descriptor: DependencyDescriptor): Boolean
Determine whether the provided bean definition is an autowire candidate. To be considered a candidate the bean's autowire-candidate attribute must not have been set to 'false'. Also, if an annotation on the field or parameter to be autowired is recognized by this bean factory as a qualifier, the bean must 'match' against the annotation as well as any attributes it may contain. The bean definition must contain the same qualifier or match by meta attributes. A "value" attribute will fallback to match against the bean name or an alias if a qualifier or attribute does not match. |
|
open fun isRequired(descriptor: DependencyDescriptor): Boolean
Determine whether the given dependency declares an autowired annotation, checking its required flag. |
|
open fun setValueAnnotationType(valueAnnotationType: Class<out Annotation>): Unit
Set the 'value' annotation type, to be used on fields, method parameters and constructor parameters. The default value annotation type is the Spring-provided Value annotation. This setter property exists so that developers can provide their own (non-Spring-specific) annotation type to indicate a default value expression for a specific argument. |