1 10 package org.picocontainer.defaults; 11 12 import org.picocontainer.ComponentAdapter; 13 import org.picocontainer.Parameter; 14 import org.picocontainer.PicoIntrospectionException; 15 16 21 public class ImplementationHidingComponentAdapterFactory extends DecoratingComponentAdapterFactory { 22 private final boolean strict; 23 24 27 public ImplementationHidingComponentAdapterFactory() { 28 this(null); 29 } 30 31 public ImplementationHidingComponentAdapterFactory(ComponentAdapterFactory delegate, boolean strict) { 32 super(delegate); 33 this.strict = strict; 34 } 35 36 public ImplementationHidingComponentAdapterFactory(ComponentAdapterFactory delegate) { 37 this(delegate, true); 38 } 39 40 public ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoIntrospectionException, AssignabilityRegistrationException, NotConcreteRegistrationException { 41 return new ImplementationHidingComponentAdapter(super.createComponentAdapter(componentKey, componentImplementation, parameters), strict); 42 } 43 } 44 | Popular Tags |