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 Summary
ConstructorDescriptionNonUniqueBeanException
(Class<? extends T> targetType, Iterator<BeanDefinition<T>> candidates) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NonUniqueBeanException
public NonUniqueBeanException(Class<? extends T> targetType, Iterator<BeanDefinition<T>> candidates) - Type Parameters:
T
- The type- Parameters:
targetType
- The target typecandidates
- 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
-