Class CommitDiffVariationDiffSource

java.lang.Object
org.variantsync.diffdetective.variation.diff.source.CommitDiffVariationDiffSource
All Implemented Interfaces:
VariationDiffSource

public class CommitDiffVariationDiffSource extends Object implements VariationDiffSource
Describes that a VariationDiff was created from a patch in a CommitDiff.
  • Field Details

    • fileName

      private final Path fileName
    • commitHash

      private final String commitHash
  • Constructor Details

    • CommitDiffVariationDiffSource

      public CommitDiffVariationDiffSource(Path fileName, String commitHash)
      Create a source that refers to changes to the given file in the given commit.
      Parameters:
      fileName - Name of the modified file from whose changes the VariationDiff was parsed.
      commitHash - Hash of the commit in which the edit occurred.
  • Method Details

    • getFileName

      public Path getFileName()
      Returns the name of the modified file from whose changes the VariationDiff was parsed.
    • getCommitHash

      public String getCommitHash()
      Returns the hash of the commit in which the edit occurred.
    • toString

      public String toString()
      Overrides:
      toString in class Object