1 10 11 package org.picocontainer.defaults; 12 13 import org.picocontainer.ComponentAdapter; 14 import org.picocontainer.Parameter; 15 import org.picocontainer.PicoIntrospectionException; 16 17 import java.io.Serializable ; 18 19 27 public class DefaultComponentAdapterFactory implements ComponentAdapterFactory, Serializable { 28 29 private ComponentMonitor componentMonitor; 30 31 public DefaultComponentAdapterFactory(ComponentMonitor componentMonitor) { 32 this.componentMonitor = componentMonitor; 33 } 34 35 public DefaultComponentAdapterFactory() { 36 this.componentMonitor = NullComponentMonitor.getInstance(); 37 } 38 39 public ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoIntrospectionException, AssignabilityRegistrationException, NotConcreteRegistrationException { 40 return new CachingComponentAdapter(new ConstructorInjectionComponentAdapter(componentKey, componentImplementation, parameters, false, componentMonitor)); 41 } 42 } 43 | Popular Tags |