org.apache.rat.anttasks
Class Report

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.rat.anttasks.Report
All Implemented Interfaces:
java.lang.Cloneable

public class Report
extends org.apache.tools.ant.Task

A basic Ant task that generates a report on all files specified by the nested resource collection(s).

ILicenseMatcher(s) can be specified as nested elements as well.

The attribute format defines the output format and can take the values


Nested Class Summary
static class Report.AddLicenseHeaders
          Type for the addLicenseHeaders attribute.
static class Report.Format
          Type for the format attribute.
 
Field Summary
 
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
Report()
           
 
Method Summary
 void add(IHeaderMatcher matcher)
          Adds a license matcher.
 void add(ILicenseFamily license)
           
 void add(org.apache.tools.ant.types.ResourceCollection rc)
          Adds resources that will be checked.
 void addConfiguredStylesheet(org.apache.tools.ant.types.resources.Union u)
          Which stylesheet to use (only meaningful with format='styled').
 void execute()
          Generates the report.
 void setAddDefaultLicenseMatchers(boolean b)
          Whether to add the default list of license matchers.
 void setAddLicenseHeaders(Report.AddLicenseHeaders pAdd)
          Wether to add license headers.
 void setCopyrightMessage(java.lang.String pMessage)
          Sets the copyright message.
 void setFormat(Report.Format f)
          Which format to use.
 void setReportFile(java.io.File f)
          Where to send the report to.
 
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
 

Constructor Detail

Report

public Report()
Method Detail

add

public void add(org.apache.tools.ant.types.ResourceCollection rc)
Adds resources that will be checked.


add

public void add(IHeaderMatcher matcher)
Adds a license matcher.


add

public void add(ILicenseFamily license)

setAddDefaultLicenseMatchers

public void setAddDefaultLicenseMatchers(boolean b)
Whether to add the default list of license matchers.


setReportFile

public void setReportFile(java.io.File f)
Where to send the report to.


setFormat

public void setFormat(Report.Format f)
Which format to use.


setAddLicenseHeaders

public void setAddLicenseHeaders(Report.AddLicenseHeaders pAdd)
Wether to add license headers.


setCopyrightMessage

public void setCopyrightMessage(java.lang.String pMessage)
Sets the copyright message.


addConfiguredStylesheet

public void addConfiguredStylesheet(org.apache.tools.ant.types.resources.Union u)
Which stylesheet to use (only meaningful with format='styled').


execute

public void execute()
Generates the report.

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


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.