KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nanocontainer > nanning > NanningNanoContainer


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 Jon Tirsen *
9  *****************************************************************************/

10
11 package org.nanocontainer.nanning;
12
13 import org.codehaus.nanning.config.AspectSystem;
14 import org.picocontainer.defaults.DefaultComponentAdapterFactory;
15 import org.picocontainer.defaults.ComponentAdapterFactory;
16 import org.picocontainer.defaults.DefaultPicoContainer;
17
18 /**
19  * @author Jon Tirsen (tirsen@codehaus.org)
20  * @author Aslak Hellesoy
21  * @version $Revision: 1.5 $
22  * @deprecated Use a {@link DefaultPicoContainer} with a {@link NanningComponentAdapterFactory}
23  * instead. This favours chaining of component adapters.
24  */

25 public class NanningNanoContainer extends DefaultPicoContainer {
26     public NanningNanoContainer(AspectSystem aspectSystem, ComponentAdapterFactory componentAdapterFactory) {
27         super(new NanningComponentAdapterFactory(aspectSystem, componentAdapterFactory));
28     }
29
30     public NanningNanoContainer(AspectSystem aspectSystem) {
31         this(aspectSystem, new DefaultComponentAdapterFactory());
32     }
33
34     public NanningNanoContainer(ComponentAdapterFactory componentAdapterFactory) {
35         this(new AspectSystem(), componentAdapterFactory);
36     }
37
38     public NanningNanoContainer() {
39         this(new AspectSystem(), new DefaultComponentAdapterFactory());
40     }
41 }
42
Popular Tags