Class AnalysisStrategy

java.lang.Object
org.variantsync.diffdetective.analysis.strategies.AnalysisStrategy
Direct Known Subclasses:
AnalysisMonitor, AnalyzeAllAndExport, AnalyzeAndExportIncrementally, CompositeAnalysisStrategy, NullStrategy

public abstract class AnalysisStrategy extends Object
Callbacks for LineGraphExportAnalysis. A strategy may perform arbitrary additional tasks upon the execution of a task. The strategy is notified about the start and end of a task as well after each processed commit.
Author:
Paul Bittner
  • Field Details

    • repo

      protected Repository repo
    • outputPath

      protected Path outputPath
  • Constructor Details

    • AnalysisStrategy

      public AnalysisStrategy()
  • Method Details

    • start

      public void start(Repository repo, Path outputPath)
      Invoked when the analysis starts.
      Parameters:
      repo - The repository on which an analysis is performed.
      outputPath - A directory to which output should be written.
    • onCommit

      public abstract OutputStream onCommit(CommitDiff commit)
      Invoked before a commit is analyzed. The returned line graph export destination is closed after processing the commit given by commit.
      Parameters:
      commit - The commit that was just processed.
      Returns:
      the line graph export destination
    • end

      public abstract void end()
      Invoked when the analysis is done for the current repository. The analysis might restart with another repository. In this case, start(org.variantsync.diffdetective.datasets.Repository, java.nio.file.Path) is invoked again.