org.gmetrics.ant
Class GMetricsTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.gmetrics.ant.GMetricsTask
All Implemented Interfaces:
groovy.lang.GroovyObject, java.lang.Cloneable

public class GMetricsTask
extends org.apache.tools.ant.Task
implements groovy.lang.GroovyObject

Ant Task for GMetrics.

The metricSetFile property specifies the path to a Groovy MetricSet definition file. By default, the path specified is relative to the classpath, but it may be optionally prefixed by any of the valid java.net.URL prefixes, such as "file:" (to load from a relative or absolute path on the filesystem), or "http:". The metricSetFile property is optional. If not specified, it uses the set of Metrics defined by DefaultMetricSet.

At least one nested fileset element is required, and is used to specify the source files to be analyzed. This is the standard Ant FileSet, and is quite powerful and flexible. See the Apache Ant Manual for more information on FileSets.

The report nested element defines the type and report-specific options for the output report. The report element includes a type attribute (which specifies the fully-qualified class name of the ReportWriter class) and can contain nested option elements. Each option, in turn, must include a name and value attribue. Currently, the BasicHtmlReportWriter class (org.gmetrics.report.BasicHtmlReportWriter) is the only report type provided.

Version:
$Revision: 101 $ - $Date: 2010-03-10 19:17:23 -0500 (Wed, 10 Mar 2010) $
Author:
Chris Mair
See Also:
"http://ant.apache.org/manual/index.html"

Field Summary
protected  java.lang.Object createGMetricsRunner
           
protected  java.util.List fileSets
           
protected  java.util.List reportWriters
           
 
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
GMetricsTask()
           
 
Method Summary
 void addConfiguredReport(Report report)
          Ant-defined method (by convention), called with each instance of a nested element within this task.
 void addFileset(org.apache.tools.ant.types.FileSet fileSet)
          Ant-defined method (by convention), called with each instance of a nested element within this task.
 void execute()
          Execute this Ant Task
 groovy.lang.MetaClass getMetaClass()
           
 java.lang.String getMetricSetFile()
           
 java.lang.Object getProperty(java.lang.String name)
           
 java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setMetricSetFile(java.lang.String value)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 
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, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reportWriters

protected java.util.List reportWriters

fileSets

protected java.util.List fileSets

createGMetricsRunner

protected java.lang.Object createGMetricsRunner
Constructor Detail

GMetricsTask

public GMetricsTask()
Method Detail

getMetricSetFile

public java.lang.String getMetricSetFile()

setMetricSetFile

public void setMetricSetFile(java.lang.String value)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Execute this Ant Task

Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

addFileset

public void addFileset(org.apache.tools.ant.types.FileSet fileSet)
Ant-defined method (by convention), called with each instance of a nested element within this task.


addConfiguredReport

public void addConfiguredReport(Report report)
Ant-defined method (by convention), called with each instance of a nested element within this task.


getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public java.lang.Object invokeMethod(java.lang.String name,
                                     java.lang.Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public java.lang.Object getProperty(java.lang.String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright © 2010. All Rights Reserved.