org.codehaus.plexus

## Interface ComponentRegistry

All Known Implementing Classes:
  DefaultComponentRegistry

    public interface ComponentRegistry

Author:
  Jason van Zyl, Kenney Westerhof, Dain Sundstrom

### Method Summary

Methods
`<T> void` `addComponent(T component, java.lang.String role, java.lang.String roleHint)`
`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> T` `lookup(ComponentDescriptor<T> componentDescriptor)`
`<T> java.util.List<T>` `lookupList(java.lang.Class<T> type, java.lang.String role, java.util.List<java.lang.String> hints)`
`<T> java.util.Map<java.lang.String,T>` `lookupMap(java.lang.Class<T> type, java.lang.String role, java.util.List<java.lang.String> hints)`
`void` `registerComponentManagerFactory(ComponentManagerFactory componentManagerFactory)`
`void` `release(java.lang.Object component)`
`void` `removeComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)`

### Method Detail

#### registerComponentManagerFactory

    void registerComponentManagerFactory(ComponentManagerFactory componentManagerFactory)

#### addComponentDescriptor

    void addComponentDescriptor(ComponentDescriptor<?> componentDescriptor)
                                throws CycleDetectedInComponentGraphException

Throws:
  `CycleDetectedInComponentGraphException`

#### getComponentDescriptor

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

#### getComponentDescriptor

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

Deprecated.

#### getComponentDescriptorList

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

#### getComponentDescriptorMap

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

#### lookup

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

Throws:
  `ComponentLookupException`

#### lookup

    <T> T lookup(ComponentDescriptor<T> componentDescriptor)
             throws ComponentLookupException

Throws:
  `ComponentLookupException`

#### lookupList

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

Throws:
  `ComponentLookupException`

#### lookupMap

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

Throws:
  `ComponentLookupException`

#### release

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

Throws:
  `ComponentLifecycleException`

#### removeComponentRealm

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

Throws:
  `PlexusContainerException`

#### dispose

    void dispose()

#### addComponent

    <T> void addComponent(T component,
                        java.lang.String role,
                        java.lang.String roleHint)