org.apache.any23.validator
Interface ValidationReportBuilder

All Known Implementing Classes:
DefaultValidationReportBuilder

public interface ValidationReportBuilder

The report interface is used to generate diagnostics about validation.

Author:
Michele Mostarda (mostarda@fbk.eu), Davide Palmisano (palmisano@fbk.eu)

Method Summary
 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.
 void traceRuleActivation(Rule r)
          Traces that a rule has been applied.
 

Method Detail

getReport

ValidationReport getReport()
Returns:
Returns the validation report.

reportIssue

void reportIssue(ValidationReport.IssueLevel issueLevel,
                 String message,
                 Node n)
Reports an issue detected on a specified node.

Parameters:
issueLevel - issue level classifier.
message - human readable message connected to the issue.
n - the node affected by the issue.

reportIssue

void reportIssue(ValidationReport.IssueLevel issueLevel,
                 String message)
Reports a detected issue.

Parameters:
issueLevel - issue level classifier.
message - human readable message connected to the issue.

traceRuleActivation

void traceRuleActivation(Rule r)
Traces that a rule has been applied.

Parameters:
r - activated rule.

reportRuleError

void reportRuleError(Rule r,
                     Exception e,
                     String msg)
Reports an error occurred while executing a Rule.

Parameters:
r - rule originating the error.
e - exception raised.
msg - human readable message.

reportFixError

void reportFixError(Fix f,
                    Exception e,
                    String msg)
Reports an error occurred while executing a Fix.

Parameters:
f - fix originating the error.
e - exception raised.
msg - human readable message.


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.