Package org.eclipse.jgit.patch
Class CombinedHunkHeader
- java.lang.Object
-
- org.eclipse.jgit.patch.HunkHeader
-
- org.eclipse.jgit.patch.CombinedHunkHeader
-
public class CombinedHunkHeader extends HunkHeader
Hunk header for a hunk appearing in a "diff --cc" style patch.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CombinedHunkHeader.CombinedOldImage
-
Nested classes/interfaces inherited from class org.eclipse.jgit.patch.HunkHeader
HunkHeader.OldImage
-
-
Field Summary
Fields Modifier and Type Field Description private CombinedHunkHeader.CombinedOldImage[]
old
-
Fields inherited from class org.eclipse.jgit.patch.HunkHeader
endOffset, file, nContext, newLineCount, newStartLine, startOffset
-
-
Constructor Summary
Constructors Constructor Description CombinedHunkHeader(CombinedFileHeader fh, int offset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
extractFileLines(java.io.OutputStream[] out)
(package private) void
extractFileLines(java.lang.StringBuilder sb, java.lang.String[] text, int[] offsets)
CombinedFileHeader
getFileHeader()
Get header for the file this hunk applies to.HunkHeader.OldImage
getOldImage()
Get information about the old image mentioned in this hunk.HunkHeader.OldImage
getOldImage(int nthParent)
Get the OldImage data related to the nth ancestor(package private) int
parseBody(Patch script, int end)
(package private) void
parseHeader()
-
Methods inherited from class org.eclipse.jgit.patch.HunkHeader
copyLine, getBuffer, getEndOffset, getLinesContext, getNewLineCount, getNewStartLine, getStartOffset, skipLine, toEditList, toString
-
-
-
-
Field Detail
-
old
private CombinedHunkHeader.CombinedOldImage[] old
-
-
Constructor Detail
-
CombinedHunkHeader
CombinedHunkHeader(CombinedFileHeader fh, int offset)
-
-
Method Detail
-
getFileHeader
public CombinedFileHeader getFileHeader()
Get header for the file this hunk applies to.- Overrides:
getFileHeader
in classHunkHeader
- Returns:
- header for the file this hunk applies to.
-
getOldImage
public HunkHeader.OldImage getOldImage()
Get information about the old image mentioned in this hunk.- Overrides:
getOldImage
in classHunkHeader
- Returns:
- information about the old image mentioned in this hunk.
-
getOldImage
public HunkHeader.OldImage getOldImage(int nthParent)
Get the OldImage data related to the nth ancestor- Parameters:
nthParent
- the ancestor to get the old image data of- Returns:
- image data of the requested ancestor.
-
parseHeader
void parseHeader()
- Overrides:
parseHeader
in classHunkHeader
-
parseBody
int parseBody(Patch script, int end)
- Overrides:
parseBody
in classHunkHeader
-
extractFileLines
void extractFileLines(java.io.OutputStream[] out) throws java.io.IOException
- Overrides:
extractFileLines
in classHunkHeader
- Throws:
java.io.IOException
-
extractFileLines
void extractFileLines(java.lang.StringBuilder sb, java.lang.String[] text, int[] offsets)
- Overrides:
extractFileLines
in classHunkHeader
-
-