org.apache.avalon.fortress.tools
Class ComponentMetaInfoCollector

java.lang.Object
  extended by org.apache.avalon.fortress.tools.ComponentMetaInfoCollector

public final class ComponentMetaInfoCollector
extends java.lang.Object

QDox-based engine to collect all the meta information for the components. This common class is utilized by both Ant and Maven plgins, and possibly others in the future.

Version:
CVS $Revision: 1.1 $ $Date: 2004/04/02 08:29:44 $
Author:
The Avalon Team

Field Summary
protected  java.util.ArrayList m_allClasses
          The list of classes to extract metadata from
private  java.io.File m_destDir
          The destination directory for metadata files.
protected  BuildLogger m_logger
          To log messages - varies by build system used
private  java.util.Map m_services
          The services to write the meta info for.
private static java.lang.String TAG_COMPONENT
           
 
Constructor Summary
ComponentMetaInfoCollector(BuildLogger logger)
           
 
Method Summary
private  void collectInfoMetaData()
          Output the metadata files.
 void execute()
          Execute generator task.
protected  Service getService(java.lang.String type)
          Get the unique Service object for the specified type.
 void setAllClasses(java.util.ArrayList allClasses)
          Set the list of classes to extract metadata from
 void setDestDir(java.io.File destDir)
          Set the destination directory for the meta information.
private  void writeComponents()
          Write the component meta information to the associated files.
 void writeServiceList(java.util.Iterator it)
          Write the service list to the "/service.list" file.
private  void writeServices()
          Collect all the services and write out the implementations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_logger

protected BuildLogger m_logger
To log messages - varies by build system used


m_allClasses

protected java.util.ArrayList m_allClasses
The list of classes to extract metadata from


m_destDir

private java.io.File m_destDir
The destination directory for metadata files.


m_services

private final java.util.Map m_services
The services to write the meta info for.


TAG_COMPONENT

private static final java.lang.String TAG_COMPONENT
See Also:
Constant Field Values
Constructor Detail

ComponentMetaInfoCollector

public ComponentMetaInfoCollector(BuildLogger logger)
Method Detail

execute

public void execute()
             throws java.lang.Exception
Execute generator task.

Throws:
BuildException - if there was a problem collecting the info
java.lang.Exception

writeComponents

private void writeComponents()
                      throws java.io.IOException,
                             org.apache.avalon.fortress.util.dag.CyclicDependencyException
Write the component meta information to the associated files.

Throws:
java.io.IOException - if there is a problem.
org.apache.avalon.fortress.util.dag.CyclicDependencyException

writeServiceList

public void writeServiceList(java.util.Iterator it)
                      throws java.io.IOException
Write the service list to the "/service.list" file.

Parameters:
it - The iterator for the services
Throws:
java.io.IOException - if there is a problem writing the file

collectInfoMetaData

private void collectInfoMetaData()
Output the metadata files.


getService

protected Service getService(java.lang.String type)
Get the unique Service object for the specified type.

Parameters:
type - The service type name
Returns:
the Service object

writeServices

private void writeServices()
Collect all the services and write out the implementations.


setAllClasses

public void setAllClasses(java.util.ArrayList allClasses)
Set the list of classes to extract metadata from

Parameters:
allClasses - The list of classes

setDestDir

public void setDestDir(java.io.File destDir)
Set the destination directory for the meta information.

Parameters:
destDir - The destination directory