Component Factories

A component will be instantiated via a instance of ComponentFactory.  There is no NullObject implementation of this. This is pluggable of course.



public interface ComponentFactory {
    Object createComponent(
            ComponentSpecification componentSpec, 
            Object[] instanceDependencies) 
        throws PicoInvocationTargetInitializationException;
}

DefaultComponentFactory

This component factory uses basic reflection to instantiate a component.



ImplementationHidingComponentFactory

This one hides the implementation of a component from another that depends on it. The malicious coder cannot cast the interface back to a known implementation,



One that logs instantiations ?