picocontainer
Interface PicoContainer

All Known Subinterfaces:
ClassRegistrationPicoContainer
All Known Implementing Classes:
DefaultPicoContainer, HierarchicalPicoContainer, NullContainer

public interface PicoContainer

PicoContainer - guaranteed to resolve the needs of components as it instantiates them.


Method Summary
 Object getComponent(Class componentType)
          Get a component for a component type.
 Object[] getComponents()
          Get all components (random order).
 Class[] getComponentTypes()
          Get all component types (random order).
 boolean hasComponent(Class componentType)
          Does the container have a partilcilar component type?
 void instantiateComponents()
          Initialize the container.
 

Method Detail

hasComponent

public boolean hasComponent(Class componentType)
Does the container have a partilcilar component type?

Parameters:
componentType - The component type to look for.
Returns:
true if it does have the component type

getComponent

public Object getComponent(Class componentType)
Get a component for a component type.

Parameters:
componentType - The component type to look for.
Returns:
the component, or null of no such component.

getComponents

public Object[] getComponents()
Get all components (random order).

Returns:
An array of components.

getComponentTypes

public Class[] getComponentTypes()
Get all component types (random order).

Returns:
an array of component types.

instantiateComponents

public void instantiateComponents()
                           throws PicoInstantiationException,
                                  PicoIntrospectionException
Initialize the container.

Throws:
PicoInstantiationException
PicoIntrospectionException


Copyright © 2003 Codehaus. All Rights Reserved.