Package org.variantsync.diffdetective
Record Class AnalysisRunner.Options
java.lang.Object
java.lang.Record
org.variantsync.diffdetective.AnalysisRunner.Options
- Record Components:
repositoriesDirectory
- The directory to which all git repositories will be cloned to. If this directory already contains the required git repositories, those copies will be used.outputDirectory
- The directory to which any output data of the analysis should be written to.datasetsFile
- Path to a markdown file containing a table of git repositories to analyze.getParseOptionsForRepo
- Determines whichPatchDiffParseOptions
to use per repository. Each repository is by default, already equipped with options. If you wish no changes, just returnRepository.getParseOptions()
here.getFilterForRepo
- Determines which filter to use for parsing diffs in given repository that is about to be analyzed. Each repository is by default, already equipped with a filter. If you wish no changes, just returnRepository.getDiffFilter()
here.preloadReposBeforeAnalysis
- Decides whether all repositories should be cloned once before the analysis. If a repository does not have a local clone inrepositoriesDirectory
it will be cloned before the analysis if preloadReposBeforeAnalysis is set to true. Otherwise it will be cloned right before it is about to be analysed.pullRepositoriesBeforeAnalysis
- Decides whether git pull should be run on each repository before analysis. Takes effect only ifpreloadReposBeforeAnalysis
is true. Does nothing otherwise.
- Enclosing class:
AnalysisRunner
public static record AnalysisRunner.Options(Path repositoriesDirectory, Path outputDirectory, Path datasetsFile, Function<Repository,PatchDiffParseOptions> getParseOptionsForRepo, Function<Repository,DiffFilter> getFilterForRepo, boolean preloadReposBeforeAnalysis, boolean pullRepositoriesBeforeAnalysis)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Path
The field for thedatasetsFile
record component.private final Function<Repository,
DiffFilter> The field for thegetFilterForRepo
record component.private final Function<Repository,
PatchDiffParseOptions> The field for thegetParseOptionsForRepo
record component.private final Path
The field for theoutputDirectory
record component.private final boolean
The field for thepreloadReposBeforeAnalysis
record component.private final boolean
The field for thepullRepositoriesBeforeAnalysis
record component.private final Path
The field for therepositoriesDirectory
record component. -
Constructor Summary
ConstructorDescriptionCreates options with the given parameters and uses default values for all other parameters.Options
(Path repositoriesDirectory, Path outputDirectory, Path datasetsFile, Function<Repository, PatchDiffParseOptions> getParseOptionsForRepo, Function<Repository, DiffFilter> getFilterForRepo, boolean preloadReposBeforeAnalysis, boolean pullRepositoriesBeforeAnalysis) Creates an instance of aOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedatasetsFile
record component.static AnalysisRunner.Options
final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegetFilterForRepo
record component.Returns the value of thegetParseOptionsForRepo
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theoutputDirectory
record component.boolean
Returns the value of thepreloadReposBeforeAnalysis
record component.boolean
Returns the value of thepullRepositoriesBeforeAnalysis
record component.Returns the value of therepositoriesDirectory
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
repositoriesDirectory
The field for therepositoriesDirectory
record component. -
outputDirectory
The field for theoutputDirectory
record component. -
datasetsFile
The field for thedatasetsFile
record component. -
getParseOptionsForRepo
The field for thegetParseOptionsForRepo
record component. -
getFilterForRepo
The field for thegetFilterForRepo
record component. -
preloadReposBeforeAnalysis
private final boolean preloadReposBeforeAnalysisThe field for thepreloadReposBeforeAnalysis
record component. -
pullRepositoriesBeforeAnalysis
private final boolean pullRepositoriesBeforeAnalysisThe field for thepullRepositoriesBeforeAnalysis
record component.
-
-
Constructor Details
-
Options
Creates options with the given parameters and uses default values for all other parameters. -
Options
public Options(Path repositoriesDirectory, Path outputDirectory, Path datasetsFile, Function<Repository, PatchDiffParseOptions> getParseOptionsForRepo, Function<Repository, DiffFilter> getFilterForRepo, boolean preloadReposBeforeAnalysis, boolean pullRepositoriesBeforeAnalysis) Creates an instance of aOptions
record class.- Parameters:
repositoriesDirectory
- the value for therepositoriesDirectory
record componentoutputDirectory
- the value for theoutputDirectory
record componentdatasetsFile
- the value for thedatasetsFile
record componentgetParseOptionsForRepo
- the value for thegetParseOptionsForRepo
record componentgetFilterForRepo
- the value for thegetFilterForRepo
record componentpreloadReposBeforeAnalysis
- the value for thepreloadReposBeforeAnalysis
record componentpullRepositoriesBeforeAnalysis
- the value for thepullRepositoriesBeforeAnalysis
record component
-
-
Method Details
-
DEFAULT
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
repositoriesDirectory
Returns the value of therepositoriesDirectory
record component.- Returns:
- the value of the
repositoriesDirectory
record component
-
outputDirectory
Returns the value of theoutputDirectory
record component.- Returns:
- the value of the
outputDirectory
record component
-
datasetsFile
Returns the value of thedatasetsFile
record component.- Returns:
- the value of the
datasetsFile
record component
-
getParseOptionsForRepo
Returns the value of thegetParseOptionsForRepo
record component.- Returns:
- the value of the
getParseOptionsForRepo
record component
-
getFilterForRepo
Returns the value of thegetFilterForRepo
record component.- Returns:
- the value of the
getFilterForRepo
record component
-
preloadReposBeforeAnalysis
public boolean preloadReposBeforeAnalysis()Returns the value of thepreloadReposBeforeAnalysis
record component.- Returns:
- the value of the
preloadReposBeforeAnalysis
record component
-
pullRepositoriesBeforeAnalysis
public boolean pullRepositoriesBeforeAnalysis()Returns the value of thepullRepositoriesBeforeAnalysis
record component.- Returns:
- the value of the
pullRepositoriesBeforeAnalysis
record component
-