org.picocontainer.defaults
Class DefaultComponentRegistry
java.lang.Object
org.picocontainer.defaults.DefaultComponentRegistry
- All Implemented Interfaces:
- ComponentRegistry, Serializable
- public class DefaultComponentRegistry
- extends Object
- implements ComponentRegistry, Serializable
The default component registry.
- Version:
- $Revision: 1.8 $
- Author:
- Aslak Hellesoy, Paul Hammant, various
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
registeredComponentSpecifications
protected final List registeredComponentSpecifications
orderedComponents
protected final List orderedComponents
componentKeyToInstanceMap
protected final Map componentKeyToInstanceMap
componentToSpec
protected final Map componentToSpec
DefaultComponentRegistry
public DefaultComponentRegistry()
registerComponent
public void registerComponent(ComponentSpecification compSpec)
- Specified by:
registerComponent
in interface ComponentRegistry
unregisterComponent
public void unregisterComponent(Object componentKey)
- Specified by:
unregisterComponent
in interface ComponentRegistry
getComponentSpecifications
public Collection getComponentSpecifications()
- Specified by:
getComponentSpecifications
in interface ComponentRegistry
getOrderedComponents
public List getOrderedComponents()
- Specified by:
getOrderedComponents
in interface ComponentRegistry
addOrderedComponent
public void addOrderedComponent(Object component)
- Specified by:
addOrderedComponent
in interface ComponentRegistry
putComponent
public void putComponent(Object componentKey,
Object component)
- Specified by:
putComponent
in interface ComponentRegistry
contains
public boolean contains(Object componentKey)
- Specified by:
contains
in interface ComponentRegistry
getComponentInstance
public Object getComponentInstance(Object componentKey)
- Specified by:
getComponentInstance
in interface ComponentRegistry
getComponentInstanceKeys
public Set getComponentInstanceKeys()
- Specified by:
getComponentInstanceKeys
in interface ComponentRegistry
getComponentInstances
public Set getComponentInstances()
- Specified by:
getComponentInstances
in interface ComponentRegistry
hasComponentInstance
public boolean hasComponentInstance(Object componentKey)
- Specified by:
hasComponentInstance
in interface ComponentRegistry
getComponentSpec
public ComponentSpecification getComponentSpec(Object componentKey)
- Specified by:
getComponentSpec
in interface ComponentRegistry
findImplementingComponent
public Object findImplementingComponent(Class componentType)
throws AmbiguousComponentResolutionException
- Specified by:
findImplementingComponent
in interface ComponentRegistry
- Throws:
AmbiguousComponentResolutionException
findImplementingComponentSpecification
public ComponentSpecification findImplementingComponentSpecification(Class componentType)
throws AmbiguousComponentResolutionException
- Specified by:
findImplementingComponentSpecification
in interface ComponentRegistry
- Throws:
AmbiguousComponentResolutionException
createComponent
public Object createComponent(ComponentSpecification componentSpecification)
throws PicoInitializationException
- Specified by:
createComponent
in interface ComponentRegistry
- Throws:
PicoInitializationException
Copyright © 2003 Codehaus. All Rights Reserved.