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 ofValidationReportBuilder
.- 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 aFix
.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 aRule
.String
toString()
void
traceRuleActivation(Rule r)
Traces that a rule has been applied.
-
-
-
Method Detail
-
getReport
public ValidationReport getReport()
- Specified by:
getReport
in interfaceValidationReportBuilder
- 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 interfaceValidationReportBuilder
- 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 interfaceValidationReportBuilder
- 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 interfaceValidationReportBuilder
- 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 aRule
.- Specified by:
reportRuleError
in interfaceValidationReportBuilder
- 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 aFix
.- Specified by:
reportFixError
in interfaceValidationReportBuilder
- Parameters:
f
- fix originating the error.e
- exception raised.msg
- human readable message.
-
-