Class PatchIdDiffFormatter

  • All Implemented Interfaces:
    AutoCloseable

    public class PatchIdDiffFormatter
    extends DiffFormatter
    A DiffFormatter used to calculate the patch-id of the diff.
    • Constructor Detail

      • PatchIdDiffFormatter

        public PatchIdDiffFormatter()
        Initialize a formatter to compute a patch id.
    • Method Detail

      • getCalulatedPatchId

        public ObjectId getCalulatedPatchId()
        Should be called after having called one of the format methods
        Returns:
        the patch id calculated for the provided diff.
      • writeHunkHeader

        protected void writeHunkHeader​(int aStartLine,
                                       int aEndLine,
                                       int bStartLine,
                                       int bEndLine)
                                throws IOException
        Output a hunk header
        Overrides:
        writeHunkHeader in class DiffFormatter
        Parameters:
        aStartLine - within first source
        aEndLine - within first source
        bStartLine - within second source
        bEndLine - within second source
        Throws:
        IOException