KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfun > yan > containers > ManualWiringContainer


1 /*****************************************************************************
2  * Copyright (C) Codehaus.org. 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 /*
9  * Created on Mar 20, 2005
10  *
11  * Author Ben Yu
12  * ZBS
13  */

14 package jfun.yan.containers;
15
16 import jfun.yan.ComponentMap;
17 import jfun.yan.Dependency;
18 import jfun.yan.ManualDependency;
19 import jfun.yan.Registrar;
20
21 /**
22  * A container where auto-wiring is disabled.
23  * <p>
24  * Codehaus.org.
25  *
26  * @author Ben Yu
27  *
28  */

29 public class ManualWiringContainer extends ImmutablePreferredContainer {
30
31   /**
32    * Create a ManualWiringContainer object.
33    * @param reg the Registrar object to use.
34    */

35   public ManualWiringContainer(Registrar reg) {
36     super(reg);
37   }
38   public Dependency getDependency(Object JavaDoc key, ComponentMap cmap){
39     return new ManualDependency(cmap, key);
40   }
41   public Dependency getDependencyOfType(Class JavaDoc type, ComponentMap cmap){
42     return new ManualDependency(cmap, type);
43   }
44 }
45
Popular Tags