Package org.apache.tools.ant.taskdefs

# Class RecorderEntry

java.lang.Object
org.apache.tools.ant.taskdefs.RecorderEntry

All Implemented Interfaces:
  `EventListener`, `BuildListener`, `BuildLogger`, `SubBuildListener`

public class RecorderEntry extends 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

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `RecorderEntry(String name)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `buildFinished(BuildEvent event)`
  Signals that the last target has finished.
  `void`
  `buildStarted(BuildEvent event)`
  Signals that a build has started.
  `void`
  `cleanup()`
  `String`
  `getFilename()`
  `int`
  `getMessageOutputLevel()`
  `Project`
  `getProject()`
  Get the project associated with this recorder entry.
  `void`
  `messageLogged(BuildEvent event)`
  Signals a message logging 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)`
  Signals that a target has finished.
  `void`
  `targetStarted(BuildEvent event)`
  Signals that a target is starting.
  `void`
  `taskFinished(BuildEvent event)`
  Signals that a task has finished.
  `void`
  `taskStarted(BuildEvent event)`
  Signals that a task is starting.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RecorderEntry

    protected RecorderEntry(String name)
    Parameters:
      `name` - The name of this recorder (used as the filename).

- ## Method Details

  - ### getFilename

    public String getFilename()
    Returns:
      the name of the file the output is sent to.

  - ### setRecordState

    public void setRecordState(Boolean state)
    Turns off or on this recorder.
    Parameters:
      `state` - true for on, false for off, null for no change.

  - ### buildStarted

    public void buildStarted(BuildEvent event)
    Description copied from interface: `BuildListener`
    Signals 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:
      `buildStarted` in interface `BuildListener`
    Parameters:
      `event` - An event with any relevant extra information. Must not be `null`.
    See Also:
      - .

  - ### buildFinished

    public void buildFinished(BuildEvent event)
    Description copied from interface: `BuildListener`
    Signals that the last target has finished. This event will still be fired if an error occurred during the build.
    Specified by:
      `buildFinished` in interface `BuildListener`
    Parameters:
      `event` - An event with any relevant extra information. Must not be `null`.
    See Also:
      - .

  - ### 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
    See Also:
      - `BuildEvent.getException()`

  - ### 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

  - ### targetStarted

    public void targetStarted(BuildEvent event)
    Description copied from interface: `BuildListener`
    Signals that a target is starting.
    Specified by:
      `targetStarted` in interface `BuildListener`
    Parameters:
      `event` - An event with any relevant extra information. Must not be `null`.
    See Also:
      - .

  - ### targetFinished

    public void targetFinished(BuildEvent event)
    Description copied from interface: `BuildListener`
    Signals that a target has finished. This event will still be fired if an error occurred during the build.
    Specified by:
      `targetFinished` in interface `BuildListener`
    Parameters:
      `event` - An event with any relevant extra information. Must not be `null`.
    See Also:
      - .

  - ### taskStarted

    public void taskStarted(BuildEvent event)
    Description copied from interface: `BuildListener`
    Signals that a task is starting.
    Specified by:
      `taskStarted` in interface `BuildListener`
    Parameters:
      `event` - An event with any relevant extra information. Must not be `null`.
    See Also:
      - .

  - ### taskFinished

    public void taskFinished(BuildEvent event)
    Description copied from interface: `BuildListener`
    Signals that a task has finished. This event will still be fired if an error occurred during the build.
    Specified by:
      `taskFinished` in interface `BuildListener`
    Parameters:
      `event` - An event with any relevant extra information. Must not be `null`.
    See Also:
      - .

  - ### messageLogged

    public void messageLogged(BuildEvent event)
    Description copied from interface: `BuildListener`
    Signals a message logging event.
    Specified by:
      `messageLogged` in interface `BuildListener`
    Parameters:
      `event` - An event with any relevant extra information. Must not be `null`.
    See Also:
      - .

  - ### setMessageOutputLevel

    public void setMessageOutputLevel(int level)
    Description copied from interface: `BuildLogger`
    Sets 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 `Project` class. The order of the levels, from least to most verbose, is `MSG_ERR`, `MSG_WARN`, `MSG_INFO`, `MSG_VERBOSE`, `MSG_DEBUG`.

    Specified by:
      `setMessageOutputLevel` in interface `BuildLogger`
    Parameters:
      `level` - the logging level for the logger.
    See Also:
      - .

  - ### getMessageOutputLevel

    public int getMessageOutputLevel()
    Specified by:
      `getMessageOutputLevel` in interface `BuildLogger`
    Returns:
      Returns the `currently set` message output level. The `default` implementation of this method returns `MSG_INFO`.

  - ### setOutputPrintStream

    public void setOutputPrintStream(PrintStream output)
    Description copied from interface: `BuildLogger`
    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`.
    See Also:
      - .

  - ### setEmacsMode

    public void setEmacsMode(boolean emacsMode)
    Description copied from interface: `BuildLogger`
    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.
    See Also:
      - .

  - ### setErrorPrintStream

    public void setErrorPrintStream(PrintStream err)
    Description copied from interface: `BuildLogger`
    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`.
    See Also:
      - .

  - ### setProject

    public void setProject(Project project)
    Set the project associated with this recorder entry.
    Parameters:
      `project` - the project instance
    Since:
      1.6.2

  - ### getProject

    public Project getProject()
    Get the project associated with this recorder entry.
    Returns:
      Project
    Since:
      1.8.0

  - ### cleanup

    public void cleanup()
    Since:
      1.6.2