org.picocontainer.extras
Class NullContainer

java.lang.Object
  extended byorg.picocontainer.extras.NullContainer
All Implemented Interfaces:
PicoContainer, Serializable

public class NullContainer
extends Object
implements PicoContainer, Serializable

See Also:
Serialized Form

Constructor Summary
NullContainer()
           
 
Method Summary
 Object getComponent(Object compType)
          Get a component for a component type.
 Collection getComponentKeys()
          Get all component types (random order).
 Object getComponentMulticaster()
          Shorthand for getComponentMulticaster(boolean, boolean)(true, true).
 Object getComponentMulticaster(boolean callInInstantiationOrder, boolean callUnmanagedComponents)
          Returns a proxy that implements the union of all the components' interfaces.
 Collection getComponents()
          Get all components (random order).
 boolean hasComponent(Object compType)
          Does the internals have a partilcilar component type?
 void instantiateComponents()
          Initialize the internals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullContainer

public NullContainer()
Method Detail

hasComponent

public boolean hasComponent(Object compType)
Description copied from interface: PicoContainer
Does the internals have a partilcilar component type?

Specified by:
hasComponent in interface PicoContainer
Parameters:
compType - The component type to look for.
Returns:
true if it does have the component type

getComponent

public Object getComponent(Object compType)
Description copied from interface: PicoContainer
Get a component for a component type.

Specified by:
getComponent in interface PicoContainer
Parameters:
compType - The component type to look for.
Returns:
the component, or null of no such component.

getComponents

public Collection getComponents()
Description copied from interface: PicoContainer
Get all components (random order).

Specified by:
getComponents in interface PicoContainer
Returns:
A collection of components.

getComponentKeys

public Collection getComponentKeys()
Description copied from interface: PicoContainer
Get all component types (random order).

Specified by:
getComponentKeys in interface PicoContainer
Returns:
A collection of component types.

instantiateComponents

public void instantiateComponents()
                           throws PicoInstantiationException
Description copied from interface: PicoContainer
Initialize the internals.

Specified by:
instantiateComponents in interface PicoContainer
Throws:
PicoInstantiationException

getComponentMulticaster

public Object getComponentMulticaster()
Description copied from interface: PicoContainer
Shorthand for PicoContainer.getComponentMulticaster(boolean, boolean)(true, true).

Specified by:
getComponentMulticaster in interface PicoContainer
Returns:
a proxy.

getComponentMulticaster

public Object getComponentMulticaster(boolean callInInstantiationOrder,
                                      boolean callUnmanagedComponents)
Description copied from interface: PicoContainer
Returns a proxy that implements the union of all the components' interfaces. Calling a method on the returned Object will call the method on all components in the internals that implement that interface.

Specified by:
getComponentMulticaster in interface PicoContainer
Parameters:
callInInstantiationOrder - whether to call the methods in the order of instantiation (true) or reverse (false)
callUnmanagedComponents - whether to exclude components registered via instance rather than class


Copyright © 2003 Codehaus. All Rights Reserved.