Package org.apache.tools.ant.taskdefs
Class RecorderEntry
java.lang.Object
org.apache.tools.ant.taskdefs.RecorderEntry
- All Implemented Interfaces:
EventListener,BuildListener,BuildLogger,SubBuildListener
This is a class that represents a recorder. This is the listener to the
build process.
- Since:
- Ant 1.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildFinished(BuildEvent event) Signals that the last target has finished.voidbuildStarted(BuildEvent event) Signals that a build has started.voidcleanup()intGet the project associated with this recorder entry.voidmessageLogged(BuildEvent event) Signals a message logging event.voidsetEmacsMode(boolean emacsMode) Sets this logger to produce emacs (and other editor) friendly output.voidSets the output stream to which this logger is to send error messages.voidsetMessageOutputLevel(int level) Sets the highest level of message this logger should respond to.voidsetOutputPrintStream(PrintStream output) Sets the output stream to which this logger is to send its output.voidsetProject(Project project) Set the project associated with this recorder entry.voidsetRecordState(Boolean state) Turns off or on this recorder.voidsubBuildFinished(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.voidsubBuildStarted(BuildEvent event) Empty implementation to satisfy the BuildListener interface.voidtargetFinished(BuildEvent event) Signals that a target has finished.voidtargetStarted(BuildEvent event) Signals that a target is starting.voidtaskFinished(BuildEvent event) Signals that a task has finished.voidtaskStarted(BuildEvent event) Signals that a task is starting.
-
Constructor Details
-
RecorderEntry
- Parameters:
name- The name of this recorder (used as the filename).
-
-
Method Details
-
getFilename
- Returns:
- the name of the file the output is sent to.
-
setRecordState
Turns off or on this recorder.- Parameters:
state- true for on, false for off, null for no change.
-
buildStarted
Description copied from interface:BuildListenerSignals that a build has started. This event is fired before any targets have started.This event is fired before the project instance is fully configured. In particular no properties have been set and the project may not know its name or default target, yet.
- Specified by:
buildStartedin interfaceBuildListener- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
buildFinished
Description copied from interface:BuildListenerSignals that the last target has finished. This event will still be fired if an error occurred during the build.- Specified by:
buildFinishedin interfaceBuildListener- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
subBuildFinished
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:
subBuildFinishedin interfaceSubBuildListener- Parameters:
event- the buildFinished event- Since:
- Ant 1.6.2
- See Also:
-
subBuildStarted
Empty implementation to satisfy the BuildListener interface.- Specified by:
subBuildStartedin interfaceSubBuildListener- Parameters:
event- the buildStarted event- Since:
- Ant 1.6.2
-
targetStarted
Description copied from interface:BuildListenerSignals that a target is starting.- Specified by:
targetStartedin interfaceBuildListener- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
targetFinished
Description copied from interface:BuildListenerSignals that a target has finished. This event will still be fired if an error occurred during the build.- Specified by:
targetFinishedin interfaceBuildListener- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
taskStarted
Description copied from interface:BuildListenerSignals that a task is starting.- Specified by:
taskStartedin interfaceBuildListener- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
taskFinished
Description copied from interface:BuildListenerSignals that a task has finished. This event will still be fired if an error occurred during the build.- Specified by:
taskFinishedin interfaceBuildListener- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
messageLogged
Description copied from interface:BuildListenerSignals a message logging event.- Specified by:
messageLoggedin interfaceBuildListener- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
setMessageOutputLevel
public void setMessageOutputLevel(int level) Description copied from interface:BuildLoggerSets the highest level of message this logger should respond to. Only messages with a message level lower than or equal to the given level should be written to the log.Constants for the message levels are in the
Projectclass. The order of the levels, from least to most verbose, isMSG_ERR,MSG_WARN,MSG_INFO,MSG_VERBOSE,MSG_DEBUG.- Specified by:
setMessageOutputLevelin interfaceBuildLogger- Parameters:
level- the logging level for the logger.- See Also:
-
getMessageOutputLevel
public int getMessageOutputLevel()- Specified by:
getMessageOutputLevelin interfaceBuildLogger- Returns:
- Returns the
currently setmessage output level. Thedefaultimplementation of this method returnsMSG_INFO.
-
setOutputPrintStream
Description copied from interface:BuildLoggerSets the output stream to which this logger is to send its output.- Specified by:
setOutputPrintStreamin interfaceBuildLogger- Parameters:
output- The output stream for the logger. Must not benull.- See Also:
-
setEmacsMode
public void setEmacsMode(boolean emacsMode) Description copied from interface:BuildLoggerSets this logger to produce emacs (and other editor) friendly output.- Specified by:
setEmacsModein interfaceBuildLogger- Parameters:
emacsMode-trueif output is to be unadorned so that emacs and other editors can parse files names, etc.- See Also:
-
setErrorPrintStream
Description copied from interface:BuildLoggerSets the output stream to which this logger is to send error messages.- Specified by:
setErrorPrintStreamin interfaceBuildLogger- Parameters:
err- The error stream for the logger. Must not benull.- See Also:
-
setProject
Set the project associated with this recorder entry.- Parameters:
project- the project instance- Since:
- 1.6.2
-
getProject
Get the project associated with this recorder entry.- Returns:
- Project
- Since:
- 1.8.0
-
cleanup
public void cleanup()- Since:
- 1.6.2
-