org.codehaus.plexus.component.repository

## Class DefaultComponentRepository

- java.lang.Object
- - org.codehaus.plexus.logging.AbstractLogEnabled
  - - org.codehaus.plexus.component.repository.DefaultComponentRepository

All Implemented Interfaces:
  ComponentRepository, LogEnabled

    public class DefaultComponentRepository
    extends AbstractLogEnabled
    implements ComponentRepository

Author:
  Jason van Zyl

### Constructor Summary

Constructors
Constructor and Description
`DefaultComponentRepository()`

### Method Summary

Methods
`void` `addComponentDescriptor(ComponentDescriptor<?> componentDescriptor)`
`<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)`
`void` `removeComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)`

### Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled

`enableLogging, getLogger, setupLogger, setupLogger, setupLogger`

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

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

### Constructor Detail

#### DefaultComponentRepository

    public DefaultComponentRepository()

### Method Detail

#### getComponentDescriptor

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

Specified by:
  `getComponentDescriptor` in interface `ComponentRepository`

#### 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 `ComponentRepository`

#### getComponentDescriptorList

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

Specified by:
  `getComponentDescriptorList` in interface `ComponentRepository`

#### 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 `ComponentRepository`

#### removeComponentRealm

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

Specified by:
  `removeComponentRealm` in interface `ComponentRepository`

#### addComponentDescriptor

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

Specified by:
  `addComponentDescriptor` in interface `ComponentRepository`
Throws:
  `CycleDetectedInComponentGraphException`