org.apache.tools.ant.taskdefs

Class RecorderEntry

Implemented Interfaces:
BuildListener, BuildLogger, EventListener, SubBuildListener

public class RecorderEntry
extends java.lang.Object
implements BuildLogger, SubBuildListener

This is a class that represents a recorder. This is the listener to the build process.

Since:
Ant 1.4

Constructor Summary

RecorderEntry(String name)

Method Summary

void
buildFinished(BuildEvent event)
void
buildStarted(BuildEvent event)
void
cleanup()
String
getFilename()
void
messageLogged(BuildEvent event)
void
setEmacsMode(boolean emacsMode)
Sets this logger to produce emacs (and other editor) friendly output.
void
setErrorPrintStream(PrintStream err)
Sets the output stream to which this logger is to send error messages.
void
setMessageOutputLevel(int level)
Sets the highest level of message this logger should respond to.
void
setOutputPrintStream(PrintStream output)
Sets the output stream to which this logger is to send its output.
void
setProject(Project project)
Set the project associated with this recorder entry.
void
setRecordState(Boolean state)
Turns off or on this recorder.
void
subBuildFinished(BuildEvent event)
Cleans up any resources held by this recorder entry at the end of a subbuild if it has been created for the subbuild's project instance.
void
subBuildStarted(BuildEvent event)
Empty implementation to satisfy the BuildListener interface.
void
targetFinished(BuildEvent event)
void
targetStarted(BuildEvent event)
void
taskFinished(BuildEvent event)
void
taskStarted(BuildEvent event)

Constructor Details

RecorderEntry

protected RecorderEntry(String name)

Parameters:
name - The name of this recorder (used as the filename).

Method Details

buildFinished

public void buildFinished(BuildEvent event)
Specified by:
buildFinished in interface BuildListener


buildStarted

public void buildStarted(BuildEvent event)
Specified by:
buildStarted in interface BuildListener


cleanup

public void cleanup()

Since:
1.6.2


getFilename

public String getFilename()

Returns:
the name of the file the output is sent to.


messageLogged

public void messageLogged(BuildEvent event)
Specified by:
messageLogged in interface BuildListener


setEmacsMode

public void setEmacsMode(boolean emacsMode)
Sets this logger to produce emacs (and other editor) friendly output.
Specified by:
setEmacsMode in interface BuildLogger

Parameters:
emacsMode - true if output is to be unadorned so that emacs and other editors can parse files names, etc.


setErrorPrintStream

public void setErrorPrintStream(PrintStream err)
Sets the output stream to which this logger is to send error messages.
Specified by:
setErrorPrintStream in interface BuildLogger

Parameters:
err - The error stream for the logger. Must not be null.


setMessageOutputLevel

public void setMessageOutputLevel(int level)
Specified by:
setMessageOutputLevel in interface BuildLogger

Parameters:
level - the logging level for the logger.


setOutputPrintStream

public void setOutputPrintStream(PrintStream output)
Sets the output stream to which this logger is to send its output.
Specified by:
setOutputPrintStream in interface BuildLogger

Parameters:
output - The output stream for the logger. Must not be null.


setProject

public void setProject(Project project)
Set the project associated with this recorder entry.

Parameters:
project - the project instance

Since:
1.6.2


setRecordState

public void setRecordState(Boolean state)
Turns off or on this recorder.

Parameters:
state - true for on, false for off, null for no change.


subBuildFinished

public void subBuildFinished(BuildEvent event)
Cleans up any resources held by this recorder entry at the end of a subbuild if it has been created for the subbuild's project instance.
Specified by:
subBuildFinished in interface SubBuildListener

Parameters:
event - the buildFinished event

Since:
Ant 1.6.2


subBuildStarted

public void subBuildStarted(BuildEvent event)
Empty implementation to satisfy the BuildListener interface.
Specified by:
subBuildStarted in interface SubBuildListener

Parameters:
event - the buildStarted event

Since:
Ant 1.6.2


targetFinished

public void targetFinished(BuildEvent event)
Specified by:
targetFinished in interface BuildListener


targetStarted

public void targetStarted(BuildEvent event)
Specified by:
targetStarted in interface BuildListener


taskFinished

public void taskFinished(BuildEvent event)
Specified by:
taskFinished in interface BuildListener


taskStarted

public void taskStarted(BuildEvent event)
Specified by:
taskStarted in interface BuildListener


Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.