org.jcoderz.phoenix.report
Class JcoderzReportAntTask

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 org.jcoderz.phoenix.report.JcoderzReportAntTask
All Implemented Interfaces:
Cloneable, org.apache.tools.ant.types.selectors.SelectorContainer

public final class JcoderzReportAntTask
extends org.apache.tools.ant.taskdefs.MatchingTask

jCoderZ Report Ant Task. This Task takes none, one or more input reports such as Checkstyle or PMD and generates a normalized report file (XML) for any Java source under srcdir.

Author:
Michael Griffel (Michael.Griffel@jcoderz.com)

Nested Class Summary
 class JcoderzReportAntTask.Report
          This class represents input report with a format and filename.
static class JcoderzReportAntTask.SourceDirectory
           
 
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
JcoderzReportAntTask()
           
 
Method Summary
 void addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
          Adds a system property.
 org.apache.tools.ant.types.Path createBootclasspath()
          Adds a bootclasspath to the command line.
 org.apache.tools.ant.types.Path createClasspath()
          Adds a classpath to the command line.
 org.apache.tools.ant.types.Commandline.Argument createJvmarg()
          Adds a JVM argument.
 JcoderzReportAntTask.Report createReport()
          Adds a report to the list of reports.
 JcoderzReportAntTask.SourceDirectory createSrcDir()
          Adds a source directory to the list of directories.
 void execute()
          Executes this task.
 void setDebug(boolean b)
          Sets the debug flag.
 void setDir(File dir)
          The directory to invoke the VM in.
 void setFailonerror(boolean b)
          Set whether we should fail on an error.
 void setFilter(File f)
          Sets the filter file.
 void setFormat(String s)
          Sets the output format.
 void setName(String projectName)
          Sets the projectName to given projectName.
 void setOut(File dir)
          Sets the output directory.
 
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

JcoderzReportAntTask

public JcoderzReportAntTask()
Method Detail

setOut

public final void setOut(File dir)
Sets the output directory. This directory is used to store the report file(s).

Parameters:
dir - the output directory

setFilter

public final void setFilter(File f)
Sets the filter file.

Parameters:
f - the filter file

setName

public final void setName(String projectName)
Sets the projectName to given projectName.

Parameters:
projectName - the project name

setDir

public void setDir(File dir)
The directory to invoke the VM in. Ignored if no JVM is forked.

Parameters:
dir - the directory to invoke the JVM from

setFailonerror

public void setFailonerror(boolean b)
Set whether we should fail on an error.

Parameters:
b - whether we should fail on an error

setFormat

public void setFormat(String s)
               throws org.apache.tools.ant.BuildException
Sets the output format.

Parameters:
s - the output format
Throws:
org.apache.tools.ant.BuildException - throws a BuildException when the format name is not valid

setDebug

public void setDebug(boolean b)
Sets the debug flag.

Parameters:
b - the debug mode

createClasspath

public org.apache.tools.ant.types.Path createClasspath()
Adds a classpath to the command line.

Returns:
the created classpath

createBootclasspath

public org.apache.tools.ant.types.Path createBootclasspath()
Adds a bootclasspath to the command line.

Returns:
the created bootclasspath

addSysproperty

public void addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
Adds a system property.

Parameters:
sysp - system property

createJvmarg

public org.apache.tools.ant.types.Commandline.Argument createJvmarg()
Adds a JVM argument.

Returns:
the created command line argument

createReport

public JcoderzReportAntTask.Report createReport()
Adds a report to the list of reports.

Returns:
the created report

createSrcDir

public JcoderzReportAntTask.SourceDirectory createSrcDir()
Adds a source directory to the list of directories.

Returns:
the created source directory

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Executes this task.

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException - An building exception occurred.


Copyright 2007 The jCoderZ Project.