org.picocontainer.defaults
Class DefaultComponentFactory

java.lang.Object
  extended byorg.picocontainer.defaults.DefaultComponentFactory
All Implemented Interfaces:
ComponentFactory, Serializable

public class DefaultComponentFactory
extends Object
implements ComponentFactory, Serializable

CompoentFactory that supports IoC type 3, which is constructor based.

Version:
$Revision: 1.8 $
Author:
Aslak Hellesoy
See Also:
Serialized Form

Constructor Summary
DefaultComponentFactory()
           
 
Method Summary
 Object createComponent(ComponentSpecification componentSpec, Object[] instanceDependencies)
          Create a component.
 Class[] getDependencies(Class componentImplementation)
          Return the types the componentImplementation component depends on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultComponentFactory

public DefaultComponentFactory()
Method Detail

createComponent

public Object createComponent(ComponentSpecification componentSpec,
                              Object[] instanceDependencies)
                       throws PicoInvocationTargetInitializationException,
                              NoPicoSuitableConstructorException
Description copied from interface: ComponentFactory
Create a component. Used by the internals of applicable PicoContainers to instantiate a component.

Specified by:
createComponent in interface ComponentFactory
Parameters:
componentSpec -
instanceDependencies - The component instances the created component will depend on.
Throws:
PicoInvocationTargetInitializationException
NoPicoSuitableConstructorException

getDependencies

public Class[] getDependencies(Class componentImplementation)
                        throws PicoIntrospectionException
Description copied from interface: ComponentFactory
Return the types the componentImplementation component depends on.

Specified by:
getDependencies in interface ComponentFactory
Parameters:
componentImplementation - concrete component class.
Throws:
PicoIntrospectionException


Copyright © 2003 Codehaus. All Rights Reserved.