Package it.unive.lisa.outputs.compare
Class JsonReportComparer.BaseDiffAlgorithm
- java.lang.Object
-
- it.unive.lisa.outputs.compare.JsonReportComparer.BaseDiffAlgorithm
-
- All Implemented Interfaces:
JsonReportComparer.DiffAlgorithm
- Enclosing class:
- JsonReportComparer
public static class JsonReportComparer.BaseDiffAlgorithm extends java.lang.Object implements JsonReportComparer.DiffAlgorithm
AJsonReportComparer.DiffAlgorithm
that dumps the differences using this class' logger, will compare all fields of the report, and will not fail fast. This class provides an implementation only of non-default method fromJsonReportComparer.DiffAlgorithm
.
-
-
Constructor Summary
Constructors Constructor Description BaseDiffAlgorithm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configurationDiff(java.lang.String key, java.lang.String first, java.lang.String second)
Callback invoked by aJsonReportComparer
whenever a configuration key is mapped to two different values.void
fileDiff(java.lang.String first, java.lang.String second, java.lang.String message)
Callback invoked by aJsonReportComparer
whenever files from different reports but with matching names have different content.void
infoDiff(java.lang.String key, java.lang.String first, java.lang.String second)
Callback invoked by aJsonReportComparer
whenever an analysis information key is mapped to two different values.void
report(JsonReportComparer.REPORTED_COMPONENT component, JsonReportComparer.REPORT_TYPE type, java.util.Collection<?> reported)
Reports a difference in one of the components of the reports.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.unive.lisa.outputs.compare.JsonReportComparer.DiffAlgorithm
customFileCompare, isJsonGraph, isVisualizationFile, shouldCompareConfigurations, shouldCompareFileContents, shouldCompareFiles, shouldCompareRunInfos, shouldCompareWarnings, shouldFailFast, verboseLabelDiff
-
-
-
-
Method Detail
-
report
public void report(JsonReportComparer.REPORTED_COMPONENT component, JsonReportComparer.REPORT_TYPE type, java.util.Collection<?> reported)
Description copied from interface:JsonReportComparer.DiffAlgorithm
Reports a difference in one of the components of the reports.- Specified by:
report
in interfaceJsonReportComparer.DiffAlgorithm
- Parameters:
component
- theJsonReportComparer.REPORTED_COMPONENT
where the difference was foundtype
- theJsonReportComparer.REPORT_TYPE
indicating what is the difference being reportedreported
- the collection of elements that are part of the report
-
fileDiff
public void fileDiff(java.lang.String first, java.lang.String second, java.lang.String message)
Description copied from interface:JsonReportComparer.DiffAlgorithm
Callback invoked by aJsonReportComparer
whenever files from different reports but with matching names have different content.- Specified by:
fileDiff
in interfaceJsonReportComparer.DiffAlgorithm
- Parameters:
first
- the complete (i.e. path + file name) pathname of the first filesecond
- the complete (i.e. path + file name) pathname of the second filemessage
- the message reporting the difference
-
infoDiff
public void infoDiff(java.lang.String key, java.lang.String first, java.lang.String second)
Description copied from interface:JsonReportComparer.DiffAlgorithm
Callback invoked by aJsonReportComparer
whenever an analysis information key is mapped to two different values.- Specified by:
infoDiff
in interfaceJsonReportComparer.DiffAlgorithm
- Parameters:
key
- the information keyfirst
- the value in the first reportsecond
- the value in the second report
-
configurationDiff
public void configurationDiff(java.lang.String key, java.lang.String first, java.lang.String second)
Description copied from interface:JsonReportComparer.DiffAlgorithm
Callback invoked by aJsonReportComparer
whenever a configuration key is mapped to two different values.- Specified by:
configurationDiff
in interfaceJsonReportComparer.DiffAlgorithm
- Parameters:
key
- the configuration keyfirst
- the value in the first reportsecond
- the value in the second report
-
-