Class AnalysisStrategy
java.lang.Object
org.variantsync.diffdetective.analysis.strategies.AnalysisStrategy
- Direct Known Subclasses:
AnalysisMonitor
,AnalyzeAllAndExport
,AnalyzeAndExportIncrementally
,CompositeAnalysisStrategy
,NullStrategy
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
end()
Invoked when the analysis is done for the current repository.abstract OutputStream
onCommit
(CommitDiff commit) Invoked before a commit is analyzed.void
start
(Repository repo, Path outputPath) Invoked when the analysis starts.
-
Field Details
-
repo
-
outputPath
-
-
Constructor Details
-
AnalysisStrategy
public AnalysisStrategy()
-
-
Method Details
-
start
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
Invoked before a commit is analyzed. The returned line graph export destination is closed after processing the commit given bycommit
.- 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.
-