1 package net.sourceforge.backpedal.nano;
2
3 import net.sourceforge.backpedal.impl.AbstractComponent;
4 import org.apache.commons.logging.Log;
5 import org.apache.commons.logging.LogFactory;
6 import org.nanocontainer.ConfiguringNanoContainerImpl;
7 import org.picocontainer.PicoInitializationException;
8
9 import javax.xml.parsers.ParserConfigurationException;
10 import java.util.Collection;
11 import java.util.Iterator;
12
13 public class BackpedalNanoContainer extends ConfiguringNanoContainerImpl.Default {
14
15 public BackpedalNanoContainer() throws ParserConfigurationException {
16 super();
17 }
18
19 public void instantiateComponents() throws PicoInitializationException {
20 super.instantiateComponents();
21 final Collection components = getComponents();
22 for (Iterator i=components.iterator();i.hasNext();) {
23 final Object configuree = i.next();
24 if(configuree instanceof AbstractComponent) {
25 final Log log = LogFactory.getLog(configuree.getClass());
26 ((AbstractComponent)configuree).enableLogging(log);
27 }
28 }
29 }
30
31 }
This page was automatically generated by Maven