picocontainer
Interface ComponentFactory
- All Known Implementing Classes:
- BeanStyleComponentFactory, DefaultComponentFactory, ImplementationHidingComponentFactory
- public interface ComponentFactory
createComponent
public Object createComponent(Class componentType,
Class componentImplementation,
Class[] dependencies,
Object[] instanceDependencies)
throws PicoInstantiationException,
PicoIntrospectionException
- Create a component. Used by the internals of applicable PicoContainers
to instantiate a component.
- Parameters:
componentType
- the type the component will be registered as.componentImplementation
- concrete component class.instanceDependencies
- The component instances the created component will depend on.
- Returns:
- The component
- Throws:
PicoInvocationTargetInitializationException
- If a problem creating the component.
PicoInstantiationException
PicoIntrospectionException
getDependencies
public Class[] getDependencies(Class componentImplementation)
throws PicoIntrospectionException
- Return the types the componentImplementation component depends on.
- Parameters:
componentImplementation
- concrete component class.
- Returns:
- an array of dependent types.
- Throws:
PicoIntrospectionException
Copyright © 2003 Codehaus. All Rights Reserved.