org.codehaus.plexus.component.composition
Class DefaultComponentComposer

java.lang.Object
  extended byorg.codehaus.plexus.component.composition.DefaultComponentComposer
All Implemented Interfaces:
ComponentComposer

public class DefaultComponentComposer
extends java.lang.Object
implements ComponentComposer

Version:
$Id: DefaultComponentComposer.java,v 1.9 2004/01/24 01:12:25 jvanzyl Exp $
Author:
Jason van Zyl

Field Summary
 
Fields inherited from interface org.codehaus.plexus.component.composition.ComponentComposer
ROLE
 
Constructor Summary
DefaultComponentComposer()
           
 
Method Summary
 void assembleComponent(java.lang.Object component, ComponentDescriptor componentDescriptor, PlexusContainer container)
           
protected  void assembleComponents(java.util.Map components, java.util.Map componentDescriptorMap, PlexusContainer container)
           
private  void assignRequirmentToField(java.lang.reflect.Field field, PlexusContainer container, java.lang.String role, java.lang.Object component)
           
protected  java.lang.reflect.Field findMatchingField(java.lang.Object component, ComponentDescriptor componentDescriptor, ComponentRequirement requirement)
           
protected  java.lang.reflect.Field getFieldByName(java.lang.Object component, java.lang.String fieldName, ComponentDescriptor componentDescriptor)
           
protected  java.lang.reflect.Field getFieldByType(java.lang.Object component, java.lang.Class type, ComponentDescriptor componentDescriptor)
           
protected  java.lang.reflect.Field getFieldByTypeIncludingSuperclasses(java.lang.Class componentClass, java.lang.Class type, ComponentDescriptor componentDescriptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultComponentComposer

public DefaultComponentComposer()
Method Detail

assembleComponent

public void assembleComponent(java.lang.Object component,
                              ComponentDescriptor componentDescriptor,
                              PlexusContainer container)
                       throws CompositionException
Specified by:
assembleComponent in interface ComponentComposer
Throws:
CompositionException

assembleComponents

protected void assembleComponents(java.util.Map components,
                                  java.util.Map componentDescriptorMap,
                                  PlexusContainer container)
                           throws CompositionException
Throws:
CompositionException

assignRequirmentToField

private void assignRequirmentToField(java.lang.reflect.Field field,
                                     PlexusContainer container,
                                     java.lang.String role,
                                     java.lang.Object component)
                              throws CompositionException
Throws:
CompositionException

findMatchingField

protected java.lang.reflect.Field findMatchingField(java.lang.Object component,
                                                    ComponentDescriptor componentDescriptor,
                                                    ComponentRequirement requirement)
                                             throws CompositionException
Throws:
CompositionException

getFieldByName

protected java.lang.reflect.Field getFieldByName(java.lang.Object component,
                                                 java.lang.String fieldName,
                                                 ComponentDescriptor componentDescriptor)
                                          throws CompositionException
Throws:
CompositionException

getFieldByTypeIncludingSuperclasses

protected java.lang.reflect.Field getFieldByTypeIncludingSuperclasses(java.lang.Class componentClass,
                                                                      java.lang.Class type,
                                                                      ComponentDescriptor componentDescriptor)
                                                               throws CompositionException
Throws:
CompositionException

getFieldByType

protected java.lang.reflect.Field getFieldByType(java.lang.Object component,
                                                 java.lang.Class type,
                                                 ComponentDescriptor componentDescriptor)
                                          throws CompositionException
Throws:
CompositionException