org.codehaus.plexus

## Class DefaultComponentRegistry

- java.lang.Object
- - org.codehaus.plexus.DefaultComponentRegistry

All Implemented Interfaces:
  ComponentRegistry

    public class DefaultComponentRegistry
    extends java.lang.Object
    implements ComponentRegistry

### Constructor Summary

Constructors
Constructor and Description
`DefaultComponentRegistry(MutablePlexusContainer container, ComponentRepository repository, LifecycleHandlerManager lifecycleHandlerManager)`

### Method Summary

Methods
`void` `addComponentDescriptor(ComponentDescriptor<?> componentDescriptor)`
`void` `dispose()`
`<T> ComponentDescriptor<T>` `getComponentDescriptor(java.lang.Class<T> type, java.lang.String role, java.lang.String roleHint)`
`ComponentDescriptor<?>` `getComponentDescriptor(java.lang.String role, java.lang.String roleHint, org.codehaus.plexus.classworlds.realm.ClassRealm realm)` Deprecated.
`<T> java.util.List<ComponentDescriptor<T>>` `getComponentDescriptorList(java.lang.Class<T> type, java.lang.String role)`
`<T> java.util.Map<java.lang.String,ComponentDescriptor<T>>` `getComponentDescriptorMap(java.lang.Class<T> type, java.lang.String role)`
`<T> T` `lookup(java.lang.Class<T> type, java.lang.String role, java.lang.String roleHint)`
`<T> java.util.List<T>` `lookupList(java.lang.Class<T> type, java.lang.String role, java.util.List<java.lang.String> roleHints)`
`<T> java.util.Map<java.lang.String,T>` `lookupMap(java.lang.Class<T> type, java.lang.String role, java.util.List<java.lang.String> roleHints)`
`void` `registerComponentManagerFactory(ComponentManagerFactory componentManagerFactory)`
`void` `release(java.lang.Object component)`
`void` `removeComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultComponentRegistry

    public DefaultComponentRegistry(MutablePlexusContainer container,
                            ComponentRepository repository,
                            LifecycleHandlerManager lifecycleHandlerManager)

### Method Detail

#### dispose

    public void dispose()

Specified by:
  `dispose` in interface `ComponentRegistry`

#### registerComponentManagerFactory

    public void registerComponentManagerFactory(ComponentManagerFactory componentManagerFactory)

Specified by:
  `registerComponentManagerFactory` in interface `ComponentRegistry`

#### addComponentDescriptor

    public void addComponentDescriptor(ComponentDescriptor<?> componentDescriptor)
                                throws ComponentRepositoryException

Specified by:
  `addComponentDescriptor` in interface `ComponentRegistry`
Throws:
  `ComponentRepositoryException`

#### getComponentDescriptor

    public <T> ComponentDescriptor<T> getComponentDescriptor(java.lang.Class<T> type,
                                                    java.lang.String role,
                                                    java.lang.String roleHint)

Specified by:
  `getComponentDescriptor` in interface `ComponentRegistry`

#### getComponentDescriptor

    @Deprecated
    public ComponentDescriptor<?> getComponentDescriptor(java.lang.String role,
                                                           java.lang.String roleHint,
                                                           org.codehaus.plexus.classworlds.realm.ClassRealm realm)

Deprecated.

Specified by:
  `getComponentDescriptor` in interface `ComponentRegistry`

#### getComponentDescriptorMap

    public <T> java.util.Map<java.lang.String,ComponentDescriptor<T>> getComponentDescriptorMap(java.lang.Class<T> type,
                                                                                       java.lang.String role)

Specified by:
  `getComponentDescriptorMap` in interface `ComponentRegistry`

#### getComponentDescriptorList

    public <T> java.util.List<ComponentDescriptor<T>> getComponentDescriptorList(java.lang.Class<T> type,
                                                                        java.lang.String role)

Specified by:
  `getComponentDescriptorList` in interface `ComponentRegistry`

#### lookup

    public <T> T lookup(java.lang.Class<T> type,
               java.lang.String role,
               java.lang.String roleHint)
             throws ComponentLookupException

Specified by:
  `lookup` in interface `ComponentRegistry`
Throws:
  `ComponentLookupException`

#### lookupMap

    public <T> java.util.Map<java.lang.String,T> lookupMap(java.lang.Class<T> type,
                                                  java.lang.String role,
                                                  java.util.List<java.lang.String> roleHints)
                                                throws ComponentLookupException

Specified by:
  `lookupMap` in interface `ComponentRegistry`
Throws:
  `ComponentLookupException`

#### lookupList

    public <T> java.util.List<T> lookupList(java.lang.Class<T> type,
                                   java.lang.String role,
                                   java.util.List<java.lang.String> roleHints)
                                 throws ComponentLookupException

Specified by:
  `lookupList` in interface `ComponentRegistry`
Throws:
  `ComponentLookupException`

#### release

    public void release(java.lang.Object component)
                 throws ComponentLifecycleException

Specified by:
  `release` in interface `ComponentRegistry`
Throws:
  `ComponentLifecycleException`

#### removeComponentRealm

    public void removeComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)
                              throws PlexusContainerException

Specified by:
  `removeComponentRealm` in interface `ComponentRegistry`
Throws:
  `PlexusContainerException`