Class JsonReportComparer

    • Constructor Detail

      • JsonReportComparer

        public JsonReportComparer()
    • Method Detail

      • compare

        public static boolean compare​(JsonReport first,
                                      JsonReport second,
                                      java.io.File firstFileRoot,
                                      java.io.File secondFileRoot)
                               throws java.io.IOException
        Compares the two reports using JsonReportComparer.BaseDiffAlgorithm. See this class' documentation for information about how reports are compared.
        Parameters:
        first - the first report
        second - the second report
        firstFileRoot - the root folder for the resolution of the file names in the first report (this should be either the workdir of that analysis or the folder where first lies)
        secondFileRoot - the root folder for the resolution of the file names in the second report (this should be either the workdir of that analysis or the folder where second lies)
        Returns:
        true if and only the two reports are equal
        Throws:
        java.io.IOException - if errors happen while opening or reading the files contained in the reports
      • compare

        public static boolean compare​(JsonReport first,
                                      JsonReport second,
                                      java.io.File firstFileRoot,
                                      java.io.File secondFileRoot,
                                      JsonReportComparer.DiffAlgorithm diff)
                               throws java.io.IOException
        Compares the two reports according to the given algorithm. See this class' documentation for information about how reports are compared.
        Parameters:
        first - the first report
        second - the second report
        firstFileRoot - the root folder for the resolution of the file names in the first report (this should be either the workdir of that analysis or the folder where first lies)
        secondFileRoot - the root folder for the resolution of the file names in the second report (this should be either the workdir of that analysis or the folder where second lies)
        diff - the JsonReportComparer.DiffAlgorithm that will be used for dumping the differences found in the two reports and for customizing the reporting process
        Returns:
        true if and only the two reports are equal
        Throws:
        java.io.IOException - if errors happen while opening or reading the files contained in the reports