Class PatchApplier.Hunk

java.lang.Object
org.machanism.machai.gw.tools.PatchApplier.Hunk
Enclosing class:
PatchApplier

private static final class PatchApplier.Hunk extends Object
Represents a patch hunk and its preferred zero-based starting position.

The start position is a preference derived from the hunk header; the applier can search nearby for the original context when necessary.

  • Field Details

    • expectedStart

      private final int expectedStart
      Preferred zero-based location of the original hunk content.
    • lines

      private final List<String> lines
      Raw, prefix-preserving patch lines that comprise the hunk.
  • Constructor Details

    • Hunk

      private Hunk(int expectedStart, List<String> lines)
      Creates a patch hunk.
      Parameters:
      expectedStart - preferred zero-based start position
      lines - raw hunk lines