org.codehaus.plexus.component.composition
Class DefaultCompositionResolver

java.lang.Object
  extended by org.codehaus.plexus.component.composition.DefaultCompositionResolver
All Implemented Interfaces:
CompositionResolver

public class DefaultCompositionResolver
extends java.lang.Object
implements CompositionResolver

Version:
$Id: DefaultCompositionResolver.java 7828 2008-11-14 22:07:56Z dain $
Author:
Jason van Zyl, Michal Maczka

Field Summary
 
Fields inherited from interface org.codehaus.plexus.component.composition.CompositionResolver
SEPARATOR_CHAR
 
Constructor Summary
DefaultCompositionResolver()
           
 
Method Summary
 void addComponentDescriptor(ComponentDescriptor<?> componentDescriptor)
           
 java.util.List findRequirements(java.lang.String role, java.lang.String roleHint)
          Returns the list of names of components which are using the component.
 java.util.List getRequirements(java.lang.String role, java.lang.String roleHint)
          Returns the list of names of components which are required by the component of given role and roleHint.
 
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 java.util.List getRequirements(java.lang.String role,
                                      java.lang.String roleHint)
Description copied from interface: CompositionResolver
Returns the list of names of components which are required by the component of given role and roleHint. The names returned are in the form role:hint, where : is defined in SEPARATOR_CHAR.

Specified by:
getRequirements in interface CompositionResolver
Parameters:
role - The name of the component
roleHint - The implementation hint of the component
Returns:
The list of components which are required by given component
See Also:
CompositionResolver.getRequirements(String,String)

findRequirements

public java.util.List findRequirements(java.lang.String role,
                                       java.lang.String roleHint)
Description copied from interface: CompositionResolver
Returns the list of names of components which are using the component. of given role and roleHint. The names returned are in the form role:hint, where : is defined in SEPARATOR_CHAR.

Specified by:
findRequirements in interface CompositionResolver
Parameters:
role - The name of the component
roleHint - The implementation hint of the component
Returns:
The list of components which are requiring given component
See Also:
CompositionResolver.findRequirements(String,String)


Copyright © 2001-2009 Codehaus. All Rights Reserved.