picocontainer
Interface ClassRegistrationPicoContainer

All Superinterfaces:
PicoContainer
All Known Implementing Classes:
DefaultPicoContainer, HierarchicalPicoContainer

public interface ClassRegistrationPicoContainer
extends PicoContainer


Method Summary
 void addParameterToComponent(Class componentType, Class parameter, Object arg)
          Add a parameter to a component.
 void registerComponent(Class componentImplementation)
          Registers a component.
 void registerComponent(Class componentType, Class componentImplementation)
          Alternate way of registering components with additional component type.
 void registerComponent(Class componentImplementation, Class componentType, Parameter[] parameters)
           
 void registerComponent(Class componentType, Object component)
          Registers a component that is instantiated and configured outside the container.
 void registerComponent(Object component)
          Registers an instantiated component.
 
Methods inherited from interface picocontainer.PicoContainer
getComponent, getComponents, getComponentTypes, hasComponent, instantiateComponents
 

Method Detail

registerComponent

public void registerComponent(Class componentImplementation)
                       throws PicoRegistrationException,
                              PicoIntrospectionException
Registers a component. Same as calling registerComponent(java.lang.Class, java.lang.Class) with the same argument.

Parameters:
componentImplementation - The class of the component to instantiate
Throws:
PicoRegistrationException - If a registration problem
PicoIntrospectionException

registerComponent

public void registerComponent(Class componentType,
                              Class componentImplementation)
                       throws PicoRegistrationException,
                              PicoIntrospectionException
Alternate way of registering components with additional component type.

Parameters:
componentType - Component type
componentImplementation - The class of the component to instantiate
Throws:
PicoRegistrationException - If a registration problem
PicoIntrospectionException

registerComponent

public void registerComponent(Class componentType,
                              Object component)
                       throws PicoRegistrationException
Registers a component that is instantiated and configured outside the container. Useful in cases where pico doesn't have sufficient knowledge to instantiate a component.

Parameters:
componentType - Component type
component - preinstantiated component
Throws:
PicoRegistrationException - If a registration problem

registerComponent

public void registerComponent(Object component)
                       throws PicoRegistrationException
Registers an instantiated component. This might be because you are creating trees of Pico containers or if you have a class that you want treated as a component, but is not Pico component compatible.

Parameters:
component - The pre instantiated component to register
Throws:
PicoRegistrationException

registerComponent

public void registerComponent(Class componentImplementation,
                              Class componentType,
                              Parameter[] parameters)
                       throws PicoRegistrationException
Throws:
PicoRegistrationException

addParameterToComponent

public void addParameterToComponent(Class componentType,
                                    Class parameter,
                                    Object arg)
                             throws PicoIntrospectionException
Add a parameter to a component. Used for configuring them. Very liekly to change before release.

Parameters:
componentType - The component type
parameter - The parameter it pertains to
arg - The argukemt to pass in.
Throws:
PicoIntrospectionException


Copyright © 2003 Codehaus. All Rights Reserved.