# Class HoldReporter

java.lang.Object
uk.ac.starlink.ttools.taplint.HoldReporter

All Implemented Interfaces:
  `Reporter`

public class HoldReporter extends Object implements Reporter
Reporter implementation that records reports, and can dump them on request to another Reporter instance.

Not thread-safe.

Since:
  24 May 2016
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`HoldReporter()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`dumpReports(Reporter reporter)`
Dumps all reports received to date to a supplied reporter.
`void`
`report(ReportCode code, String msg)`
Reports a message.
`void`
`report(ReportCode code, String msg, Throwable err)`
Reports a message with an associated throwable.

### Methods inherited from class Object

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

## Constructor Details

### HoldReporter

public HoldReporter()
Constructor.

## Method Details

### report

public void report(ReportCode code, String msg)
Description copied from interface: `Reporter`
Reports a message.

This convenience method is equivalent to calling `report(code,message,null)`

Specified by:
  `report` in interface `Reporter`
Parameters:
  `code` - report code; messages with the same code should identify essentially the same condition
  `msg` - free-text message; it may be multi-line and/or longish, but may in practice be truncated on output

### report

public void report(ReportCode code, String msg, Throwable err)
Description copied from interface: `Reporter`
Reports a message with an associated throwable.

Specified by:
  `report` in interface `Reporter`
Parameters:
  `code` - report code; messages with the same code should identify essentially the same condition
  `msg` - free-text message; it may be multi-line and/or longish, but may in practice be truncated on output
  `err` - throwable

### dumpReports

public void dumpReports(Reporter reporter)
Dumps all reports received to date to a supplied reporter. Reports are passed on in order of receipt. The list of held reports is emptied by calling this method.

Parameters:
  `reporter` - destination reporter