1 10 11 package org.nanocontainer.reflection; 12 13 import java.io.Serializable ; 14 15 import org.nanocontainer.NanoPicoContainer; 16 import org.picocontainer.MutablePicoContainer; 17 import org.picocontainer.PicoContainer; 18 import org.picocontainer.alternatives.ImplementationHidingPicoContainer; 19 import org.picocontainer.defaults.ComponentAdapterFactory; 20 import org.picocontainer.defaults.DefaultComponentAdapterFactory; 21 22 32 public class ImplementationHidingNanoPicoContainer extends AbstractNanoPicoContainer implements NanoPicoContainer, Serializable { 33 34 public ImplementationHidingNanoPicoContainer(ClassLoader classLoader, ComponentAdapterFactory caf, PicoContainer parent) { 35 super(new ImplementationHidingPicoContainer(caf, parent), classLoader); 36 } 37 38 39 public ImplementationHidingNanoPicoContainer(ClassLoader classLoader, PicoContainer parent) { 40 super(new ImplementationHidingPicoContainer(new DefaultComponentAdapterFactory(), parent), classLoader); 41 } 42 43 public ImplementationHidingNanoPicoContainer(PicoContainer pc) { 44 this(ImplementationHidingNanoPicoContainer.class.getClassLoader(), pc); 45 } 46 47 public ImplementationHidingNanoPicoContainer(ClassLoader classLoader) { 48 this(classLoader, null); 49 } 50 51 public ImplementationHidingNanoPicoContainer() { 52 this(ImplementationHidingNanoPicoContainer.class.getClassLoader(), null); 53 } 54 55 64 protected ImplementationHidingNanoPicoContainer(final ImplementationHidingNanoPicoContainer parent) { 65 super(parent.getDelegate().makeChildContainer(), parent.getComponentClassLoader()); 66 } 67 68 69 protected AbstractNanoPicoContainer createChildContainer() { 70 return new ImplementationHidingNanoPicoContainer(this); 71 } 72 } 73 | Popular Tags |