Package org.eclipse.jgit.patch
Class HunkHeader
- java.lang.Object
-
- org.eclipse.jgit.patch.HunkHeader
-
- Direct Known Subclasses:
CombinedHunkHeader
public class HunkHeader extends java.lang.Object
Hunk header describing the layout of a single block of lines
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HunkHeader.OldImage
Details about an old image of the file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBuffer()
int
getEndOffset()
FileHeader
getFileHeader()
int
getLinesContext()
int
getNewLineCount()
int
getNewStartLine()
HunkHeader.OldImage
getOldImage()
int
getStartOffset()
EditList
toEditList()
java.lang.String
toString()
-
-
-
Method Detail
-
getFileHeader
public FileHeader getFileHeader()
- Returns:
- header for the file this hunk applies to
-
getBuffer
public byte[] getBuffer()
- Returns:
- the byte array holding this hunk's patch script.
-
getStartOffset
public int getStartOffset()
- Returns:
- offset the start of this hunk in
getBuffer()
.
-
getEndOffset
public int getEndOffset()
- Returns:
- offset one past the end of the hunk in
getBuffer()
.
-
getOldImage
public HunkHeader.OldImage getOldImage()
- Returns:
- information about the old image mentioned in this hunk.
-
getNewStartLine
public int getNewStartLine()
- Returns:
- first line number in the post-image file where the hunk starts
-
getNewLineCount
public int getNewLineCount()
- Returns:
- Total number of post-image lines this hunk covers
-
getLinesContext
public int getLinesContext()
- Returns:
- total number of lines of context appearing in this hunk
-
toEditList
public EditList toEditList()
- Returns:
- a list describing the content edits performed within the hunk.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-