Class NonUniqueBeanException

  • All Implemented Interfaces:
    java.io.Serializable

    public class NonUniqueBeanException
    extends NoSuchBeanException
    Exception thrown when a bean is not unique and has multiple possible implementations for a given bean type.
    Since:
    1.0
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> java.lang.Class<T> getBeanType()  
      <T> java.util.Iterator<BeanDefinition<T>> getPossibleCandidates()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NonUniqueBeanException

        public NonUniqueBeanException​(java.lang.Class targetType,
                                      java.util.Iterator<BeanDefinition<T>> candidates)
        Type Parameters:
        T - The type
        Parameters:
        targetType - The target type
        candidates - The bean definition candidates
    • Method Detail

      • getPossibleCandidates

        public <T> java.util.Iterator<BeanDefinition<T>> getPossibleCandidates()
        Type Parameters:
        T - The type
        Returns:
        The possible bean candidates
      • getBeanType

        public <T> java.lang.Class<T> getBeanType()
        Type Parameters:
        T - The type
        Returns:
        The bean type requested