org.picocontainer.defaults
Class AbstractPicoContainer

java.lang.Object
  extended byorg.picocontainer.defaults.AbstractPicoContainer
All Implemented Interfaces:
MutablePicoContainer, PicoContainer, Serializable
Direct Known Subclasses:
DefaultPicoContainer

public abstract class AbstractPicoContainer
extends Object
implements MutablePicoContainer, Serializable

Version:
$Revision: 1.5 $
Author:
Aslak Hellesøy
See Also:
Serialized Form

Constructor Summary
protected AbstractPicoContainer(ComponentAdapterFactory componentAdapterFactory)
           
 
Method Summary
 void addOrderedComponentInstance(Object componentInstance)
           
abstract  ComponentAdapter findComponentAdapter(Object componentKey)
           
 Object findComponentInstance(Class componentType)
           
 ComponentAdapter findImplementingComponentAdapter(Class componentType)
           
abstract  List getComponentAdapters()
           
 Object getComponentInstance(Object componentKey)
           
 Collection getComponentInstances()
           
abstract  Collection getComponentKeys()
           
 Object getComponentMulticaster()
           
 Object getComponentMulticaster(boolean callInInstantiationOrder, boolean callUnmanagedComponents)
           
 List getOrderedComponents()
           
 boolean hasComponent(Object componentKey)
           
abstract  void registerComponent(ComponentAdapter compSpec)
           
 void registerComponentImplementation(Class componentImplementation)
           
 void registerComponentImplementation(Object componentKey, Class componentImplementation)
           
 void registerComponentImplementation(Object componentKey, Class componentImplementation, Parameter[] parameters)
           
 void registerComponentInstance(Object component)
           
 void registerComponentInstance(Object componentKey, Object componentInstance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.picocontainer.MutablePicoContainer
unregisterComponent
 

Constructor Detail

AbstractPicoContainer

protected AbstractPicoContainer(ComponentAdapterFactory componentAdapterFactory)
Method Detail

getComponentKeys

public abstract Collection getComponentKeys()
Specified by:
getComponentKeys in interface PicoContainer

getComponentAdapters

public abstract List getComponentAdapters()

registerComponent

public abstract void registerComponent(ComponentAdapter compSpec)
                                throws PicoRegistrationException
Throws:
PicoRegistrationException

findComponentAdapter

public abstract ComponentAdapter findComponentAdapter(Object componentKey)
                                               throws AmbiguousComponentResolutionException
Specified by:
findComponentAdapter in interface MutablePicoContainer
Throws:
AmbiguousComponentResolutionException

registerComponentInstance

public void registerComponentInstance(Object component)
                               throws PicoRegistrationException
Specified by:
registerComponentInstance in interface MutablePicoContainer
Throws:
PicoRegistrationException

registerComponentInstance

public void registerComponentInstance(Object componentKey,
                                      Object componentInstance)
                               throws PicoRegistrationException
Specified by:
registerComponentInstance in interface MutablePicoContainer
Throws:
PicoRegistrationException

registerComponentImplementation

public void registerComponentImplementation(Class componentImplementation)
                                     throws PicoRegistrationException
Specified by:
registerComponentImplementation in interface MutablePicoContainer
Throws:
PicoRegistrationException

getComponentMulticaster

public Object getComponentMulticaster(boolean callInInstantiationOrder,
                                      boolean callUnmanagedComponents)
                               throws PicoInitializationException,
                                      PicoIntrospectionException,
                                      AssignabilityRegistrationException,
                                      NotConcreteRegistrationException
Specified by:
getComponentMulticaster in interface PicoContainer
Throws:
PicoInitializationException
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException

getComponentMulticaster

public Object getComponentMulticaster()
                               throws PicoInitializationException,
                                      PicoIntrospectionException,
                                      AssignabilityRegistrationException,
                                      NotConcreteRegistrationException
Specified by:
getComponentMulticaster in interface PicoContainer
Throws:
PicoInitializationException
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException

registerComponentImplementation

public void registerComponentImplementation(Object componentKey,
                                            Class componentImplementation)
                                     throws PicoRegistrationException
Specified by:
registerComponentImplementation in interface MutablePicoContainer
Throws:
PicoRegistrationException

registerComponentImplementation

public void registerComponentImplementation(Object componentKey,
                                            Class componentImplementation,
                                            Parameter[] parameters)
                                     throws PicoRegistrationException
Specified by:
registerComponentImplementation in interface MutablePicoContainer
Throws:
PicoRegistrationException

getOrderedComponents

public List getOrderedComponents()

addOrderedComponentInstance

public void addOrderedComponentInstance(Object componentInstance)
Specified by:
addOrderedComponentInstance in interface MutablePicoContainer

getComponentInstances

public Collection getComponentInstances()
                                 throws PicoException
Specified by:
getComponentInstances in interface PicoContainer
Throws:
PicoException

getComponentInstance

public Object getComponentInstance(Object componentKey)
                            throws PicoException
Specified by:
getComponentInstance in interface PicoContainer
Throws:
PicoException

findComponentInstance

public Object findComponentInstance(Class componentType)
                             throws PicoException
Throws:
PicoException

hasComponent

public boolean hasComponent(Object componentKey)
Specified by:
hasComponent in interface PicoContainer

findImplementingComponentAdapter

public ComponentAdapter findImplementingComponentAdapter(Class componentType)
                                                  throws PicoException
Throws:
PicoException


Copyright © 2003 Codehaus. All Rights Reserved.