Class NonUniqueBeanException

All Implemented Interfaces:
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
Author:
Graeme Rocher
See Also:
  • Constructor Details

    • NonUniqueBeanException

      public 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

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

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