Package io.micronaut.context.exceptions
Class NonUniqueBeanException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.micronaut.context.exceptions.BeanContextException
io.micronaut.context.exceptions.NoSuchBeanException
io.micronaut.context.exceptions.NonUniqueBeanException
- All Implemented Interfaces:
- Serializable
Exception thrown when a bean is not unique and has multiple possible implementations for a given bean type.
- Since:
- 1.0
- Author:
- Graeme Rocher
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionNonUniqueBeanException(Class<? extends T> targetType, Iterator<BeanDefinition<T>> candidates) 
- 
Method SummaryMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
NonUniqueBeanExceptionpublic NonUniqueBeanException(Class<? extends T> targetType, Iterator<BeanDefinition<T>> candidates) - Type Parameters:
- T- The type
- Parameters:
- targetType- The target type
- candidates- The bean definition candidates
 
 
- 
- 
Method Details- 
getPossibleCandidates- Type Parameters:
- T- The type
- Returns:
- The possible bean candidates
 
- 
getBeanType- Type Parameters:
- T- The type
- Returns:
- The bean type requested
 
 
-