Package org.apache.any23.validator

## Class DefaultValidationReportBuilder

- java.lang.Object
- - org.apache.any23.validator.DefaultValidationReportBuilder

- All Implemented Interfaces:
    `ValidationReportBuilder`

      public class DefaultValidationReportBuilder
      extends Object
      implements ValidationReportBuilder

  Default implementation of `ValidationReportBuilder`.
  Author:
    Michele Mostarda (mostarda@fbk.eu), Davide Palmisano (palmisano@fbk.eu)

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultValidationReportBuilder()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ValidationReport` | `getReport()` |
    `void` | `reportFixError​(Fix f, Exception e, String msg)` | Reports an error occurred while executing a `Fix`.
    `void` | `reportIssue​(ValidationReport.IssueLevel issueLevel, String message)` | Reports a detected issue.
    `void` | `reportIssue​(ValidationReport.IssueLevel issueLevel, String message, Node n)` | Reports an issue detected on a specified node.
    `void` | `reportRuleError​(Rule r, Exception e, String msg)` | Reports an error occurred while executing a `Rule`.
    `String` | `toString()` |
    `void` | `traceRuleActivation​(Rule r)` | Traces that a rule has been applied.

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

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

- - ### Constructor Detail

    - #### DefaultValidationReportBuilder

          public DefaultValidationReportBuilder()

  - ### Method Detail

    - #### getReport

          public ValidationReport getReport()

      Specified by:
        `getReport` in interface `ValidationReportBuilder`
      Returns:
        Returns the validation report.

    - #### reportIssue

          public void reportIssue​(ValidationReport.IssueLevel issueLevel,
                                  String message,
                                  Node n)

      Description copied from interface: `ValidationReportBuilder`
      Reports an issue detected on a specified node.
      Specified by:
        `reportIssue` in interface `ValidationReportBuilder`
      Parameters:
        `issueLevel` - issue level classifier.
        `message` - human readable message connected to the issue.
        `n` - the node affected by the issue.

    - #### reportIssue

          public void reportIssue​(ValidationReport.IssueLevel issueLevel,
                                  String message)

      Description copied from interface: `ValidationReportBuilder`
      Reports a detected issue.
      Specified by:
        `reportIssue` in interface `ValidationReportBuilder`
      Parameters:
        `issueLevel` - issue level classifier.
        `message` - human readable message connected to the issue.

    - #### traceRuleActivation

          public void traceRuleActivation​(Rule r)

      Description copied from interface: `ValidationReportBuilder`
      Traces that a rule has been applied.
      Specified by:
        `traceRuleActivation` in interface `ValidationReportBuilder`
      Parameters:
        `r` - activated rule.

    - #### reportRuleError

          public void reportRuleError​(Rule r,
                                      Exception e,
                                      String msg)

      Description copied from interface: `ValidationReportBuilder`
      Reports an error occurred while executing a `Rule`.
      Specified by:
        `reportRuleError` in interface `ValidationReportBuilder`
      Parameters:
        `r` - rule originating the error.
        `e` - exception raised.
        `msg` - human readable message.

    - #### reportFixError

          public void reportFixError​(Fix f,
                                     Exception e,
                                     String msg)

      Description copied from interface: `ValidationReportBuilder`
      Reports an error occurred while executing a `Fix`.
      Specified by:
        `reportFixError` in interface `ValidationReportBuilder`
      Parameters:
        `f` - fix originating the error.
        `e` - exception raised.
        `msg` - human readable message.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`