mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Polishing
This commit is contained in:
+10
-9
@@ -44,9 +44,10 @@ import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* {@link AutowireCandidateResolver} implementation that matches bean definition qualifiers
|
||||
* against {@link Qualifier qualifier annotations} on the field or parameter to be autowired.
|
||||
* Also supports suggested expression values through a {@link Value value} annotation.
|
||||
* {@link AutowireCandidateResolver} implementation that matches bean definition
|
||||
* qualifiers against {@link #addQualifierType(Class) qualifier annotations} on
|
||||
* the field or parameter to be autowired. Also supports suggested expression
|
||||
* values through a {@link #setValueAnnotationType(Class) value annotation}.
|
||||
*
|
||||
* <p>Also supports JSR-330's {@link jakarta.inject.Qualifier} annotation if available.
|
||||
*
|
||||
@@ -68,7 +69,7 @@ public class QualifierAnnotationAutowireCandidateResolver extends GenericTypeAwa
|
||||
|
||||
/**
|
||||
* Create a new {@code QualifierAnnotationAutowireCandidateResolver} for Spring's
|
||||
* standard {@link Qualifier} annotation.
|
||||
* standard {@link Qualifier @Qualifier} annotation.
|
||||
* <p>Also supports JSR-330's {@link jakarta.inject.Qualifier} annotation if available.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -107,11 +108,11 @@ public class QualifierAnnotationAutowireCandidateResolver extends GenericTypeAwa
|
||||
/**
|
||||
* Register the given type to be used as a qualifier when autowiring.
|
||||
* <p>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.
|
||||
* method parameters and constructor parameters) as well as
|
||||
* meta-annotations that in turn identify actual qualifier annotations.
|
||||
* <p>This implementation only supports annotations as qualifier types.
|
||||
* The default is Spring's {@link Qualifier} annotation which serves
|
||||
* as a qualifier for direct use and also as a meta annotation.
|
||||
* The default is Spring's {@link Qualifier @Qualifier} annotation which serves
|
||||
* as a qualifier for direct use and also as a meta-annotation.
|
||||
* @param qualifierType the annotation type to register
|
||||
*/
|
||||
public void addQualifierType(Class<? extends Annotation> qualifierType) {
|
||||
@@ -122,7 +123,7 @@ public class QualifierAnnotationAutowireCandidateResolver extends GenericTypeAwa
|
||||
* Set the 'value' annotation type, to be used on fields, method parameters
|
||||
* and constructor parameters.
|
||||
* <p>The default value annotation type is the Spring-provided
|
||||
* {@link Value} annotation.
|
||||
* {@link Value @Value} annotation.
|
||||
* <p>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.
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* <p>This is the base class for
|
||||
* {@link org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver},
|
||||
* providing an implementation all non-annotation-based resolution steps at this level.
|
||||
* providing an implementation for all non-annotation-based resolution steps at this level.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 4.0
|
||||
|
||||
Reference in New Issue
Block a user