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 classCombinedHunkHeader.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) voidextractFileLines(java.io.OutputStream[] out)(package private) voidextractFileLines(java.lang.StringBuilder sb, java.lang.String[] text, int[] offsets)CombinedFileHeadergetFileHeader()Get header for the file this hunk applies to.HunkHeader.OldImagegetOldImage()Get information about the old image mentioned in this hunk.HunkHeader.OldImagegetOldImage(int nthParent)Get the OldImage data related to the nth ancestor(package private) intparseBody(Patch script, int end)(package private) voidparseHeader()-
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:
getFileHeaderin 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:
getOldImagein 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:
parseHeaderin classHunkHeader
-
parseBody
int parseBody(Patch script, int end)
- Overrides:
parseBodyin classHunkHeader
-
extractFileLines
void extractFileLines(java.io.OutputStream[] out) throws java.io.IOException- Overrides:
extractFileLinesin classHunkHeader- Throws:
java.io.IOException
-
extractFileLines
void extractFileLines(java.lang.StringBuilder sb, java.lang.String[] text, int[] offsets)- Overrides:
extractFileLinesin classHunkHeader
-
-