org.codehaus.plexus.component.composition

## Class DefaultCompositionResolver

- java.lang.Object
- - org.codehaus.plexus.component.composition.DefaultCompositionResolver

All Implemented Interfaces:
  CompositionResolver

    public class DefaultCompositionResolver
    extends Object
    implements CompositionResolver

Version:
  $Id: DefaultCompositionResolver.java 1700 2005-04-14 06:13:58Z brett $
Author:
  Michal Maczka

### Constructor Summary

Constructors
Constructor and Description
`DefaultCompositionResolver()`

### Method Summary

Methods
`void` `addComponentDescriptor(ComponentDescriptor componentDescriptor)`
`List` `findRequirements(String componentKey)` Returns the list of names of components which are using the component.
`List` `getRequirements(String componentKey)` Returns the list of names of components which are required by the component of given componentKey.

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

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

### Constructor Detail

#### DefaultCompositionResolver

    public DefaultCompositionResolver()

### Method Detail

#### addComponentDescriptor

    public void addComponentDescriptor(ComponentDescriptor componentDescriptor)
                                throws CompositionException

Specified by:
  `addComponentDescriptor` in interface `CompositionResolver`
Throws:
  `CompositionException` - when cycle is detected

#### getRequirements

    public List getRequirements(String componentKey)

Description copied from interface: `CompositionResolver`
Returns the list of names of components which are required by the component of given componentKey.

Specified by:
  `getRequirements` in interface `CompositionResolver`
Parameters:
  `componentKey` - The name of the component
Returns:
  The list of components which are required by given component
See Also:
  `CompositionResolver.getRequirements(java.lang.String)`

#### findRequirements

    public List findRequirements(String componentKey)

Description copied from interface: `CompositionResolver`
Returns the list of names of components which are using the component. of given componentKey

Specified by:
  `findRequirements` in interface `CompositionResolver`
Parameters:
  `componentKey` - The name of the component
Returns:
  The list of components which are requiring given component
See Also:
  `CompositionResolver.findRequirements(java.lang.String)`