net.sf.jameleon.ant
Class JameleonXDoclet

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by com.thoughtworks.qdox.ant.AbstractQdoxTask
              extended by net.sf.jameleon.ant.JameleonXDoclet

public class JameleonXDoclet
extends AbstractQdoxTask

An Ant task that registers all functional points (defined in isA, which defaults to FunctionTag) so they can be recognized by the Jameleon engine.


Field Summary
protected  String isA
           
protected  Javadoc2Bean j2b
           
protected  File outputDir
           
protected  String outputFileName
           
protected  boolean quiet
           
 
Fields inherited from class com.thoughtworks.qdox.ant.AbstractQdoxTask
allClasses, allSources, fileMap
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
JameleonXDoclet()
           
 
Method Summary
protected  File constructFileFromClassName(String className)
          Simply constructs a file from a String that represents the fully qualified class name.
 void execute()
          Implement this method and play with _xJavaDoc
protected  String getTagDefsFileName()
           
protected  void mergeBuilderSources(Javadoc2Bean j2b)
           
protected  void saveTagDefs(Properties props, String fileName)
          Saves the function point names and their corresponding class names to a file
protected  void serializeFunctionalPoint(FunctionalPoint fp, String className)
           
protected  void setClassAttributes(JavaClass clazz, Properties props, Javadoc2Bean j2b)
          Set the class-specific attributes
 void setIsA(String isA)
          Restricts the javadocs to be extracted to all classes that implement this class
 void setOutputDir(File outputDir)
          Set the directory where TestCaseTagDefs.properties will be generated to
 void setOutputFileName(String fileName)
          Set the file where the function points will be registered to.
 void setQuiet(boolean quiet)
          Sets the messages to be printed to stdout to true/false
 
Methods inherited from class com.thoughtworks.qdox.ant.AbstractQdoxTask
addFileset, buildFileMap, buildFileMap, createDocletTagFactory, processClasses, processSources, validateAttributes
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputDir

protected File outputDir

outputFileName

protected String outputFileName

isA

protected String isA

quiet

protected boolean quiet

j2b

protected Javadoc2Bean j2b
Constructor Detail

JameleonXDoclet

public JameleonXDoclet()
Method Detail

setOutputDir

public void setOutputDir(File outputDir)
Set the directory where TestCaseTagDefs.properties will be generated to

Parameters:
outputDir - - The directory where TestCaseTagDefs.properties will be generated to.

setIsA

public void setIsA(String isA)
Restricts the javadocs to be extracted to all classes that implement this class

Parameters:
isA - - The class to restrict by.

setQuiet

public void setQuiet(boolean quiet)
Sets the messages to be printed to stdout to true/false

Parameters:
quiet - - Set to true to be quite. Defaults to false

setOutputFileName

public void setOutputFileName(String fileName)
Set the file where the function points will be registered to. The default is TestCaseTagDefs.properties if this is not set

Parameters:
fileName - - The name of the file where the information will be sent to. This does not include the directory as that is set via the outputDir property.

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Implement this method and play with _xJavaDoc

Overrides:
execute in class AbstractQdoxTask
Throws:
org.apache.tools.ant.BuildException - Ant's way of reporting exception

mergeBuilderSources

protected void mergeBuilderSources(Javadoc2Bean j2b)

constructFileFromClassName

protected File constructFileFromClassName(String className)
Simply constructs a file from a String that represents the fully qualified class name. The path to the file will be prefixed by the outputDir.

Parameters:
className - - a String representing the name and partial (package) location of the file.
Returns:
A file that starts with outputDir and is followed by the directory structure (package) of the className

getTagDefsFileName

protected String getTagDefsFileName()
Returns:
the complete path to the output file for the tag definitions of functional points

saveTagDefs

protected void saveTagDefs(Properties props,
                           String fileName)
                    throws org.apache.tools.ant.BuildException
Saves the function point names and their corresponding class names to a file

Parameters:
props - - The properties to save to a file.
Throws:
org.apache.tools.ant.BuildException

setClassAttributes

protected void setClassAttributes(JavaClass clazz,
                                  Properties props,
                                  Javadoc2Bean j2b)
                           throws org.apache.tools.ant.BuildException
Set the class-specific attributes

Throws:
org.apache.tools.ant.BuildException

serializeFunctionalPoint

protected void serializeFunctionalPoint(FunctionalPoint fp,
                                        String className)
                                 throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.