Package org.picocontainer.injectors
Class AbstractInjector.AmbiguousComponentResolutionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.picocontainer.PicoException
-
- org.picocontainer.PicoCompositionException
-
- org.picocontainer.injectors.AbstractInjector.AmbiguousComponentResolutionException
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- AbstractInjector<T>
public static final class AbstractInjector.AmbiguousComponentResolutionException extends PicoCompositionException
Exception that is thrown as part of the introspection. Raised if a PicoContainer cannot resolve a type dependency because the registeredComponentAdapter
s are not distinct.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AmbiguousComponentResolutionException(Class<?> ambiguousDependency, String[] componentKeys)
Construct a new exception with the ambiguous class type and the ambiguous component keys.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
getAmbiguousComponentKeys()
String
getMessage()
void
setComponent(String component)
void
setMember(AccessibleObject accessibleObject)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
AmbiguousComponentResolutionException
public AmbiguousComponentResolutionException(Class<?> ambiguousDependency, String[] componentKeys)
Construct a new exception with the ambiguous class type and the ambiguous component keys.- Parameters:
ambiguousDependency
- the unresolved dependency typecomponentKeys
- the ambiguous keys.
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
- Returns:
- Returns a string containing the unresolved class type and the ambiguous keys.
-
getAmbiguousComponentKeys
public String[] getAmbiguousComponentKeys()
- Returns:
- Returns the ambiguous component keys as array.
-
setComponent
public void setComponent(String component)
-
setMember
public void setMember(AccessibleObject accessibleObject)
-
-