KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > picocontainer > defaults > UnsatisfiableDependenciesException


1 /*****************************************************************************
2  * Copyright (C) PicoContainer Organization. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  * *
8  * Original code by *
9  *****************************************************************************/

10 package org.picocontainer.defaults;
11
12 import org.picocontainer.ComponentAdapter;
13 import org.picocontainer.PicoIntrospectionException;
14
15 import java.util.Set JavaDoc;
16
17 /**
18  * @author Aslak Hellesøy
19  * @version $Revision: 1801 $
20  */

21 public class UnsatisfiableDependenciesException extends PicoIntrospectionException {
22
23     private final ComponentAdapter instantiatingComponentAdapter;
24     private final Set JavaDoc failedDependencies;
25
26     public UnsatisfiableDependenciesException(ComponentAdapter instantiatingComponentAdapter, Set JavaDoc failedDependencies) {
27         super(instantiatingComponentAdapter.getComponentImplementation().getName() + " has unsatisfiable dependencies: " + failedDependencies);
28         this.instantiatingComponentAdapter = instantiatingComponentAdapter;
29         this.failedDependencies = failedDependencies;
30     }
31
32     public ComponentAdapter getUnsatisfiableComponentAdapter() {
33         return instantiatingComponentAdapter;
34     }
35
36     public Set JavaDoc getUnsatisfiableDependencies() {
37         return failedDependencies;
38     }
39
40 }
41
Popular Tags