public class NoUniqueBeanDefinitionException extends NoSuchBeanDefinitionException
BeanFactory is asked for a bean instance for which
 multiple matching candidates have been found when only one matching bean was expected.BeanFactory.getBean(Class), 
Serialized Form| Constructor and Description | 
|---|
| NoUniqueBeanDefinitionException(Class<?> type,
                               Collection<String> beanNamesFound)Create a new  NoUniqueBeanDefinitionException. | 
| NoUniqueBeanDefinitionException(Class<?> type,
                               int numberOfBeansFound,
                               String message)Create a new  NoUniqueBeanDefinitionException. | 
| NoUniqueBeanDefinitionException(Class<?> type,
                               String... beanNamesFound)Create a new  NoUniqueBeanDefinitionException. | 
| NoUniqueBeanDefinitionException(org.springframework.core.ResolvableType type,
                               Collection<String> beanNamesFound)Create a new  NoUniqueBeanDefinitionException. | 
| NoUniqueBeanDefinitionException(org.springframework.core.ResolvableType type,
                               String... beanNamesFound)Create a new  NoUniqueBeanDefinitionException. | 
| Modifier and Type | Method and Description | 
|---|---|
| Collection<String> | getBeanNamesFound()Return the names of all beans found when only one matching bean was expected. | 
| int | getNumberOfBeansFound()Return the number of beans found when only one matching bean was expected. | 
getBeanName, getBeanType, getResolvableTypecontains, getMessage, getMostSpecificCause, getRootCauseaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic NoUniqueBeanDefinitionException(Class<?> type, int numberOfBeansFound, String message)
NoUniqueBeanDefinitionException.type - required type of the non-unique beannumberOfBeansFound - the number of matching beansmessage - detailed message describing the problempublic NoUniqueBeanDefinitionException(Class<?> type, Collection<String> beanNamesFound)
NoUniqueBeanDefinitionException.type - required type of the non-unique beanbeanNamesFound - the names of all matching beans (as a Collection)public NoUniqueBeanDefinitionException(Class<?> type, String... beanNamesFound)
NoUniqueBeanDefinitionException.type - required type of the non-unique beanbeanNamesFound - the names of all matching beans (as an array)public NoUniqueBeanDefinitionException(org.springframework.core.ResolvableType type,
                                       Collection<String> beanNamesFound)
NoUniqueBeanDefinitionException.type - required type of the non-unique beanbeanNamesFound - the names of all matching beans (as a Collection)public NoUniqueBeanDefinitionException(org.springframework.core.ResolvableType type,
                                       String... beanNamesFound)
NoUniqueBeanDefinitionException.type - required type of the non-unique beanbeanNamesFound - the names of all matching beans (as an array)public int getNumberOfBeansFound()
getNumberOfBeansFound in class NoSuchBeanDefinitionExceptionNoSuchBeanDefinitionException.getBeanType()@Nullable public Collection<String> getBeanNamesFound()
null if not specified at construction time.NoSuchBeanDefinitionException.getBeanType()