Package: org.gmetrics.report

## [Groovy] Class AbstractReportWriter

- org.gmetrics.report.AbstractReportWriter

- All Implemented Interfaces and Traits:
    ReportWriter

      abstract class AbstractReportWriter

  Abstract superclass for ReportWriter implementation classes.

  Subclasses must implement the `writeReport(Writer, ResultsNode, AnalysisContext)` method and define a `defaultOutputFile` property.
  Authors:
    Chris Mair

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static def` | `BASE_MESSAGES_BUNDLE` |
    `protected static def` | `CUSTOM_MESSAGES_BUNDLE` |
    `protected static def` | `GMETRICS_URL` |
    `protected def` | `LOG` |
    `protected def` | `customMessagesBundleName` |
    `protected def` | `formatterFactory` |
    `protected Map<Metric, Formatter>` | `formatters` |
    `protected def` | `getTimestamp` |
    `protected def` | `initializeResourceBundle` |
    `protected def` | `resourceBundle` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `String` | `outputFile`
    `Object` | `writeToStandardOut`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected String` | `formatMetricResultValue(String metricName, Object value)`
    `` | `protected String` | `getFormattedTimestamp()`
    `` | `protected String` | `getResourceBundleString(String resourceKey, String defaultString = '?')`
    `` | `protected String` | `getResourceBundleStringOrNull(String resourceKey)`
    `` | `protected void` | `initializeDefaultResourceBundle()`
    `` | `protected void` | `initializeFormatters(MetricSet metricSet)`
    `` | `protected void` | `writeReport(Writer writer, ResultsNode resultsNode, AnalysisContext analysisContext)`
    `` | `void` | `writeReport(ResultsNode resultsNode, AnalysisContext analysisContext)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### protected static final def BASE_MESSAGES_BUNDLE

    - #### protected static final def CUSTOM_MESSAGES_BUNDLE

    - #### protected static final def GMETRICS_URL

    - #### @SuppressWarnings(['LoggerWithWrongModifiers', 'FieldName']) protected final def LOG

    - #### protected def customMessagesBundleName

    - #### protected def formatterFactory

    - #### protected Map<Metric, Formatter> formatters

    - #### protected def getTimestamp

    - #### protected def initializeResourceBundle

    - #### protected def resourceBundle

  - ### Property Detail

    - #### String outputFile

    - #### Object writeToStandardOut

  - ### Method Detail

    - #### protected String formatMetricResultValue(String metricName, Object value)

    - #### protected String getFormattedTimestamp()

    - #### protected String getResourceBundleString(String resourceKey, String defaultString = '?')

    - #### @SuppressWarnings('ReturnNullFromCatchBlock') protected String getResourceBundleStringOrNull(String resourceKey)

    - #### protected void initializeDefaultResourceBundle()

    - #### protected void initializeFormatters(MetricSet metricSet)

    - #### protected void writeReport(Writer writer, ResultsNode resultsNode, AnalysisContext analysisContext)

    - #### void writeReport(ResultsNode resultsNode, AnalysisContext analysisContext)