org.codehaus.plexus.cdc
Class DefaultComponentDescriptorCreator

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.codehaus.plexus.cdc.DefaultComponentDescriptorCreator
All Implemented Interfaces:
ComponentDescriptorCreator, org.codehaus.plexus.logging.LogEnabled

public class DefaultComponentDescriptorCreator
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ComponentDescriptorCreator

So, in this case it is easy enough to determine the role and the implementation. We could also employ some secondary checks like looking for particular super classes or whatever. We can always use the @tags to be explicit but in most cases we can probably determine the correct component descriptor without requiring @tags.

Version:
$Id: DefaultComponentDescriptorCreator.java 2084 2005-06-05 12:18:13Z trygvis $
Author:
Jason van Zyl, Trygve Laugstøl

Field Summary
private  ComponentGleaner gleaner
           
 
Fields inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
 
Fields inherited from interface org.codehaus.plexus.cdc.ComponentDescriptorCreator
ROLE
 
Constructor Summary
DefaultComponentDescriptorCreator()
           
 
Method Summary
private  void element(org.codehaus.plexus.util.xml.XMLWriter w, java.lang.String name, java.lang.String value)
           
private  com.thoughtworks.qdox.model.JavaClass getJavaClass(com.thoughtworks.qdox.model.JavaSource javaSource)
           
 void processSources(java.io.File[] sourceDirectories, java.io.File outputDirectory)
           
private  void validateConfiguration(org.codehaus.plexus.component.repository.ComponentSetDescriptor componentSetDescriptor)
           
private  void writeComponents(org.codehaus.plexus.util.xml.XMLWriter w, java.util.List componentDescriptors)
           
private  void writeConfiguration(org.codehaus.plexus.util.xml.XMLWriter w, org.codehaus.plexus.configuration.PlexusConfiguration configuration)
           
 void writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w, org.codehaus.plexus.component.repository.ComponentSetDescriptor componentSetDescriptor)
           
private  void writeDependencyElement(org.codehaus.plexus.component.repository.ComponentDependency dependency, org.codehaus.plexus.util.xml.XMLWriter w)
           
private  void writePlexusConfiguration(org.codehaus.plexus.util.xml.XMLWriter xmlWriter, org.codehaus.plexus.configuration.PlexusConfiguration c)
           
private  void writeRequirements(org.codehaus.plexus.util.xml.XMLWriter w, java.util.List requirements)
           
 
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
 

Field Detail

gleaner

private ComponentGleaner gleaner
Constructor Detail

DefaultComponentDescriptorCreator

public DefaultComponentDescriptorCreator()
Method Detail

processSources

public void processSources(java.io.File[] sourceDirectories,
                           java.io.File outputDirectory)
                    throws ComponentDescriptorCreatorException
Specified by:
processSources in interface ComponentDescriptorCreator
Throws:
ComponentDescriptorCreatorException

validateConfiguration

private void validateConfiguration(org.codehaus.plexus.component.repository.ComponentSetDescriptor componentSetDescriptor)
                            throws ComponentDescriptorCreatorException
Throws:
ComponentDescriptorCreatorException

writeComponents

private void writeComponents(org.codehaus.plexus.util.xml.XMLWriter w,
                             java.util.List componentDescriptors)
                      throws ComponentDescriptorCreatorException,
                             org.codehaus.plexus.configuration.PlexusConfigurationException
Throws:
ComponentDescriptorCreatorException
org.codehaus.plexus.configuration.PlexusConfigurationException

writeRequirements

private void writeRequirements(org.codehaus.plexus.util.xml.XMLWriter w,
                               java.util.List requirements)

writeConfiguration

private void writeConfiguration(org.codehaus.plexus.util.xml.XMLWriter w,
                                org.codehaus.plexus.configuration.PlexusConfiguration configuration)
                         throws ComponentDescriptorCreatorException,
                                org.codehaus.plexus.configuration.PlexusConfigurationException
Throws:
ComponentDescriptorCreatorException
org.codehaus.plexus.configuration.PlexusConfigurationException

writeDependencies

public void writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w,
                              org.codehaus.plexus.component.repository.ComponentSetDescriptor componentSetDescriptor)

writeDependencyElement

private void writeDependencyElement(org.codehaus.plexus.component.repository.ComponentDependency dependency,
                                    org.codehaus.plexus.util.xml.XMLWriter w)

writePlexusConfiguration

private void writePlexusConfiguration(org.codehaus.plexus.util.xml.XMLWriter xmlWriter,
                                      org.codehaus.plexus.configuration.PlexusConfiguration c)
                               throws org.codehaus.plexus.configuration.PlexusConfigurationException
Throws:
org.codehaus.plexus.configuration.PlexusConfigurationException

element

private void element(org.codehaus.plexus.util.xml.XMLWriter w,
                     java.lang.String name,
                     java.lang.String value)

getJavaClass

private com.thoughtworks.qdox.model.JavaClass getJavaClass(com.thoughtworks.qdox.model.JavaSource javaSource)