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 whichPatchDiffParseOptionsto 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 inrepositoriesDirectoryit 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 ifpreloadReposBeforeAnalysisis 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
FieldsModifier and TypeFieldDescriptionprivate final PathThe field for thedatasetsFilerecord component.private final Function<Repository, DiffFilter> The field for thegetFilterForReporecord component.private final Function<Repository, PatchDiffParseOptions> The field for thegetParseOptionsForReporecord component.private final PathThe field for theoutputDirectoryrecord component.private final booleanThe field for thepreloadReposBeforeAnalysisrecord component.private final booleanThe field for thepullRepositoriesBeforeAnalysisrecord component.private final PathThe field for therepositoriesDirectoryrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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 aOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedatasetsFilerecord component.static AnalysisRunner.Optionsfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegetFilterForReporecord component.Returns the value of thegetParseOptionsForReporecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theoutputDirectoryrecord component.booleanReturns the value of thepreloadReposBeforeAnalysisrecord component.booleanReturns the value of thepullRepositoriesBeforeAnalysisrecord component.Returns the value of therepositoriesDirectoryrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
repositoriesDirectory
The field for therepositoriesDirectoryrecord component. -
outputDirectory
The field for theoutputDirectoryrecord component. -
datasetsFile
The field for thedatasetsFilerecord component. -
getParseOptionsForRepo
The field for thegetParseOptionsForReporecord component. -
getFilterForRepo
The field for thegetFilterForReporecord component. -
preloadReposBeforeAnalysis
private final boolean preloadReposBeforeAnalysisThe field for thepreloadReposBeforeAnalysisrecord component. -
pullRepositoriesBeforeAnalysis
private final boolean pullRepositoriesBeforeAnalysisThe field for thepullRepositoriesBeforeAnalysisrecord component.
-
-
Constructor Details
-
Options
Creates options with the given parameters and uses default values for all other parameters.- See Also:
-
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 aOptionsrecord class.- Parameters:
repositoriesDirectory- the value for therepositoriesDirectoryrecord componentoutputDirectory- the value for theoutputDirectoryrecord componentdatasetsFile- the value for thedatasetsFilerecord componentgetParseOptionsForRepo- the value for thegetParseOptionsForReporecord componentgetFilterForRepo- the value for thegetFilterForReporecord componentpreloadReposBeforeAnalysis- the value for thepreloadReposBeforeAnalysisrecord componentpullRepositoriesBeforeAnalysis- the value for thepullRepositoriesBeforeAnalysisrecord 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 therepositoriesDirectoryrecord component.- Returns:
- the value of the
repositoriesDirectoryrecord component
-
outputDirectory
Returns the value of theoutputDirectoryrecord component.- Returns:
- the value of the
outputDirectoryrecord component
-
datasetsFile
Returns the value of thedatasetsFilerecord component.- Returns:
- the value of the
datasetsFilerecord component
-
getParseOptionsForRepo
Returns the value of thegetParseOptionsForReporecord component.- Returns:
- the value of the
getParseOptionsForReporecord component
-
getFilterForRepo
Returns the value of thegetFilterForReporecord component.- Returns:
- the value of the
getFilterForReporecord component
-
preloadReposBeforeAnalysis
public boolean preloadReposBeforeAnalysis()Returns the value of thepreloadReposBeforeAnalysisrecord component.- Returns:
- the value of the
preloadReposBeforeAnalysisrecord component
-
pullRepositoriesBeforeAnalysis
public boolean pullRepositoriesBeforeAnalysis()Returns the value of thepullRepositoriesBeforeAnalysisrecord component.- Returns:
- the value of the
pullRepositoriesBeforeAnalysisrecord component
-