org.codehaus.plexus.component.composition
Class SetterComponentComposer

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.plexus.component.composition.AbstractComponentComposer
          extended byorg.codehaus.plexus.component.composition.SetterComponentComposer
All Implemented Interfaces:
ComponentComposer, LogEnabled

public class SetterComponentComposer
extends AbstractComponentComposer

Version:
$Id: SetterComponentComposer.java 1323 2004-12-20 23:00:59Z jvanzyl $
Author:
Michal Maczka

Field Summary
 
Fields inherited from class org.codehaus.plexus.component.composition.AbstractComponentComposer
 
Fields inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
 
Fields inherited from interface org.codehaus.plexus.component.composition.ComponentComposer
ROLE
 
Constructor Summary
SetterComponentComposer()
           
 
Method Summary
 java.util.List assembleComponent(java.lang.Object component, ComponentDescriptor descriptor, PlexusContainer container)
           
protected  java.beans.PropertyDescriptor findMatchingPropertyDescriptor(ComponentRequirement requirement, java.beans.PropertyDescriptor[] propertyDescriptors)
           
private  java.lang.String getErrorMessage(ComponentDescriptor descriptor, ComponentRequirement requirement, java.lang.String causeDescription)
           
protected  java.beans.PropertyDescriptor getPropertyDescriptorByName(java.lang.String name, java.beans.PropertyDescriptor[] propertyDescriptors)
           
protected  java.beans.PropertyDescriptor getPropertyDescriptorByType(java.lang.String type, java.beans.PropertyDescriptor[] propertyDescriptors)
           
private  void reportErrorCannotAssignRequiredComponent(ComponentDescriptor descriptor, ComponentRequirement requirement, java.lang.Exception e)
           
private  void reportErrorCannotLookupRequiredComponent(ComponentDescriptor descriptor, ComponentRequirement requirement, java.lang.Throwable cause)
           
private  void reportErrorFailedToIntrospect(ComponentDescriptor descriptor)
           
private  void reportErrorNoSuchProperty(ComponentDescriptor descriptor, ComponentRequirement requirement)
           
private  java.util.List setProperty(java.lang.Object component, ComponentDescriptor descriptor, ComponentRequirement requirement, java.beans.PropertyDescriptor propertyDescriptor, PlexusContainer container)
           
 
Methods inherited from class org.codehaus.plexus.component.composition.AbstractComponentComposer
getId
 
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

SetterComponentComposer

public SetterComponentComposer()
Method Detail

assembleComponent

public java.util.List assembleComponent(java.lang.Object component,
                                        ComponentDescriptor descriptor,
                                        PlexusContainer container)
                                 throws CompositionException,
                                        UndefinedComponentComposerException
Parameters:
component -
descriptor -
container -
Returns:
List of ComponentDescriptors which were used by ComponentComposer
Throws:
UndefinedComponentComposerException
CompositionException

setProperty

private java.util.List setProperty(java.lang.Object component,
                                   ComponentDescriptor descriptor,
                                   ComponentRequirement requirement,
                                   java.beans.PropertyDescriptor propertyDescriptor,
                                   PlexusContainer container)
                            throws CompositionException
Throws:
CompositionException

findMatchingPropertyDescriptor

protected java.beans.PropertyDescriptor findMatchingPropertyDescriptor(ComponentRequirement requirement,
                                                                       java.beans.PropertyDescriptor[] propertyDescriptors)
Parameters:
requirement -
Returns:

getPropertyDescriptorByName

protected java.beans.PropertyDescriptor getPropertyDescriptorByName(java.lang.String name,
                                                                    java.beans.PropertyDescriptor[] propertyDescriptors)
Parameters:
name -
Returns:

getPropertyDescriptorByType

protected java.beans.PropertyDescriptor getPropertyDescriptorByType(java.lang.String type,
                                                                    java.beans.PropertyDescriptor[] propertyDescriptors)

reportErrorNoSuchProperty

private void reportErrorNoSuchProperty(ComponentDescriptor descriptor,
                                       ComponentRequirement requirement)
                                throws CompositionException
Throws:
CompositionException

reportErrorCannotAssignRequiredComponent

private void reportErrorCannotAssignRequiredComponent(ComponentDescriptor descriptor,
                                                      ComponentRequirement requirement,
                                                      java.lang.Exception e)
                                               throws CompositionException
Throws:
CompositionException

reportErrorCannotLookupRequiredComponent

private void reportErrorCannotLookupRequiredComponent(ComponentDescriptor descriptor,
                                                      ComponentRequirement requirement,
                                                      java.lang.Throwable cause)
                                               throws CompositionException
Throws:
CompositionException

reportErrorFailedToIntrospect

private void reportErrorFailedToIntrospect(ComponentDescriptor descriptor)
                                    throws CompositionException
Parameters:
descriptor -
Throws:
CompositionException

getErrorMessage

private java.lang.String getErrorMessage(ComponentDescriptor descriptor,
                                         ComponentRequirement requirement,
                                         java.lang.String causeDescription)