org.codehaus.plexus.component.composition
Class SetterComponentComposer
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.plexus.component.composition.AbstractComponentComposer
org.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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SetterComponentComposer
public SetterComponentComposer()
assembleComponent
public java.util.List assembleComponent(java.lang.Object component,
ComponentDescriptor descriptor,
PlexusContainer container)
throws CompositionException,
UndefinedComponentComposerException
- Returns:
- List of ComponentDescriptors which were used by ComponentComposer
- Throws:
CompositionException
UndefinedComponentComposerException
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)