com.nokia.ant.taskdefs
Class CoverageRecorderTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.Recorder
              extended by com.nokia.ant.taskdefs.CoverageRecorderTask
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, org.apache.tools.ant.BuildListener, org.apache.tools.ant.SubBuildListener

public class CoverageRecorderTask
extends org.apache.tools.ant.taskdefs.Recorder

Adds a listener, which inherits the Ant Record task, to the current build process that records the output to a XML file.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.Recorder
org.apache.tools.ant.taskdefs.Recorder.ActionChoices, org.apache.tools.ant.taskdefs.Recorder.VerbosityLevelChoices
 
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
CoverageRecorderTask()
           
 
Method Summary
 void execute()
          The main execution.
protected  CoverageRecorderEntry getRecorder(java.lang.String name, org.apache.tools.ant.Project proj, java.lang.String recordTaskName)
          Gets the recorder that's associated with the passed in name.
 void setAction(org.apache.tools.ant.taskdefs.Recorder.ActionChoices action)
          Sets the action for the associated recorder entry.
 void setAppend(boolean append)
          Whether or not the logger should append to a previous file.
 void setEmacsMode(boolean emacsMode)
          Set emacs mode.
 void setLoglevel(org.apache.tools.ant.taskdefs.Recorder.VerbosityLevelChoices level)
          Sets the level to which this recorder entry should log to.
 void setName(java.lang.String fname)
          Sets the name of the file to log to, and the name of the recorder entry.
 
Methods inherited from class org.apache.tools.ant.taskdefs.Recorder
buildFinished, buildStarted, getRecorder, init, messageLogged, subBuildFinished, subBuildStarted, targetFinished, targetStarted, taskFinished, taskStarted
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, 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

CoverageRecorderTask

public CoverageRecorderTask()
Method Detail

setName

public void setName(java.lang.String fname)
Sets the name of the file to log to, and the name of the recorder entry.

Overrides:
setName in class org.apache.tools.ant.taskdefs.Recorder
Parameters:
fname - File name of logfile.

setAction

public void setAction(org.apache.tools.ant.taskdefs.Recorder.ActionChoices action)
Sets the action for the associated recorder entry.

Overrides:
setAction in class org.apache.tools.ant.taskdefs.Recorder
Parameters:
action - The action for the entry to take: start or stop.

setAppend

public void setAppend(boolean append)
Whether or not the logger should append to a previous file.

Overrides:
setAppend in class org.apache.tools.ant.taskdefs.Recorder
Parameters:
append - if true, append to a previous file.

setEmacsMode

public void setEmacsMode(boolean emacsMode)
Set emacs mode.

Overrides:
setEmacsMode in class org.apache.tools.ant.taskdefs.Recorder
Parameters:
emacsMode - if true use emacs mode

setLoglevel

public void setLoglevel(org.apache.tools.ant.taskdefs.Recorder.VerbosityLevelChoices level)
Sets the level to which this recorder entry should log to.

Overrides:
setLoglevel in class org.apache.tools.ant.taskdefs.Recorder
Parameters:
level - the level to set. see VerbosityLevelChoices

execute

public void execute()
The main execution.

Overrides:
execute in class org.apache.tools.ant.taskdefs.Recorder
Throws:
org.apache.tools.ant.BuildException - on error

getRecorder

protected CoverageRecorderEntry getRecorder(java.lang.String name,
                                            org.apache.tools.ant.Project proj,
                                            java.lang.String recordTaskName)
Gets the recorder that's associated with the passed in name. If the recorder doesn't exist, then a new one is created.

Parameters:
name - the name of the recoder
proj - the current project
Returns:
a recorder
Throws:
org.apache.tools.ant.BuildException - on error