org.picocontainer.injectors
Class AbstractInjector.AmbiguousComponentResolutionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.picocontainer.PicoException
                  extended by org.picocontainer.PicoCompositionException
                      extended by 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 registered ComponentAdapters are not distinct.

Author:
Paul Hammant, Aslak Hellesøy, Jon Tirsén
See Also:
Serialized Form

Constructor Summary
AbstractInjector.AmbiguousComponentResolutionException(Class<?> ambiguousDependency, String[] componentKeys)
          Construct a new exception with the ambiguous class type and the ambiguous component keys.
 
Method Summary
 String[] getAmbiguousComponentKeys()
           
 String getMessage()
           
 void setComponent(String component)
           
 void setMember(AccessibleObject accessibleObject)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, 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

AbstractInjector.AmbiguousComponentResolutionException

public AbstractInjector.AmbiguousComponentResolutionException(Class<?> ambiguousDependency,
                                                              String[] componentKeys)
Construct a new exception with the ambiguous class type and the ambiguous component keys.

Parameters:
ambiguousDependency - the unresolved dependency type
componentKeys - the ambiguous keys.
Method Detail

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable
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)


Copyright © 2003-2012 Codehaus. All Rights Reserved.