Class SimpleAutowireCandidateResolver
java.lang.Object
org.springframework.beans.factory.support.SimpleAutowireCandidateResolver
- All Implemented Interfaces:
- AutowireCandidateResolver
- Direct Known Subclasses:
- GenericTypeAwareAutowireCandidateResolver
AutowireCandidateResolver implementation to use when no annotation
 support is available. This implementation checks the bean definition only.- Since:
- 2.5
- Author:
- Mark Fisher, Juergen Hoeller
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final SimpleAutowireCandidateResolverShared instance ofSimpleAutowireCandidateResolver.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionThis implementation returnsthisas-is.resolveAutowireCandidates(ConfigurableListableBeanFactory lbf, Class<T> type) Resolve a map of all beans of the given type, also picking up beans defined in ancestor bean factories, with the specific condition that each bean actually has autowire candidate status.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.support.AutowireCandidateResolvergetLazyResolutionProxyClass, getLazyResolutionProxyIfNecessary, getSuggestedName, getSuggestedValue, hasQualifier, isAutowireCandidate, isRequired
- 
Field Details- 
INSTANCEShared instance ofSimpleAutowireCandidateResolver.- Since:
- 5.2.7
 
 
- 
- 
Constructor Details- 
SimpleAutowireCandidateResolverpublic SimpleAutowireCandidateResolver()
 
- 
- 
Method Details- 
cloneIfNecessaryThis implementation returnsthisas-is.- Specified by:
- cloneIfNecessaryin interface- AutowireCandidateResolver
- See Also:
 
- 
resolveAutowireCandidatespublic static <T> Map<String,T> resolveAutowireCandidates(ConfigurableListableBeanFactory lbf, Class<T> type) Resolve a map of all beans of the given type, also picking up beans defined in ancestor bean factories, with the specific condition that each bean actually has autowire candidate status. This matches simple injection point resolution as implemented by thisAutowireCandidateResolverstrategy, including beans which are not marked as default candidates but excluding beans which are not even marked as autowire candidates.- Parameters:
- lbf- the bean factory
- type- the type of bean to match
- Returns:
- the Map of matching bean instances, or an empty Map if none
- Throws:
- BeansException- if a bean could not be created
- Since:
- 6.2.3
- See Also:
 
 
-