gr.spinellis.ckjm.ant
Class CkjmTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.MatchingTask
              extended by gr.spinellis.ckjm.ant.CkjmTask
All Implemented Interfaces:
java.lang.Cloneable, org.apache.tools.ant.types.selectors.SelectorContainer

public class CkjmTask
extends org.apache.tools.ant.taskdefs.MatchingTask

Ant task definition for the CKJM metrics tool.

Version:
$Revision: 1.3 $
Author:
Julien Rentrop

Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
CkjmTask()
           
 
Method Summary
 org.apache.tools.ant.types.Path createExtdirs()
          Adds a path to extdirs.
 void execute()
          Executes the CKJM Ant Task.
 org.apache.tools.ant.types.Path getExtdirs()
          Gets the extension directories that will be used by ckjm.
 void setClassdir(java.io.File classDir)
          Sets the dir which contains the class files that will be analyzed
 void setExtdirs(org.apache.tools.ant.types.Path e)
          Sets the extension directories that will be used by ckjm.
 void setFormat(java.lang.String format)
          Sets the format of the output file.
 void setOutputfile(java.io.File outputfile)
          Sets the outputfile
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CkjmTask

public CkjmTask()
Method Detail

setFormat

public void setFormat(java.lang.String format)
Sets the format of the output file.

Parameters:
format - the format of the output file. Allowable values are 'plain' or 'xml'.

setOutputfile

public void setOutputfile(java.io.File outputfile)
Sets the outputfile

Parameters:
outputfile - Location of outputfile

setClassdir

public void setClassdir(java.io.File classDir)
Sets the dir which contains the class files that will be analyzed

Parameters:
classDir - Location of class files

setExtdirs

public void setExtdirs(org.apache.tools.ant.types.Path e)
Sets the extension directories that will be used by ckjm.

Parameters:
extdirs - a path containing .jar files

getExtdirs

public org.apache.tools.ant.types.Path getExtdirs()
Gets the extension directories that will be used by ckjm.

Returns:
the extension directories as a path

createExtdirs

public org.apache.tools.ant.types.Path createExtdirs()
Adds a path to extdirs.

Returns:
a path to be modified

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Executes the CKJM Ant Task. This method redirects the output of the CKJM tool to a file. When XML format is used it will buffer the output and translate it to the XML format.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - if an error occurs.