Class FileHeaderUtil
java.lang.Object
com.google.gerrit.server.patch.gitfilediff.FileHeaderUtil
A utility class for the 
FileHeader JGit object- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Patch.ChangeTypegetChangeType(org.eclipse.jgit.patch.FileHeader header) Returns the change type associated with the file header.static com.google.common.collect.ImmutableList<String>getHeaderLines(String header) static com.google.common.collect.ImmutableList<String>getHeaderLines(org.eclipse.jgit.patch.FileHeader fileHeader) Splits theFileHeaderstring to a list of strings, one string per header line.getNewPath(org.eclipse.jgit.patch.FileHeader header) Returns the new file path associated with theFileHeader, or empty if the file isPatch.ChangeType.DELETED.getOldPath(org.eclipse.jgit.patch.FileHeader header) Returns the old file path associated with theFileHeader, or empty if the file isPatch.ChangeType.ADDEDorPatch.ChangeType.REWRITE.static Patch.PatchTypegetPatchType(org.eclipse.jgit.patch.FileHeader header) 
- 
Constructor Details- 
FileHeaderUtilpublic FileHeaderUtil()
 
- 
- 
Method Details- 
getHeaderLinespublic static com.google.common.collect.ImmutableList<String> getHeaderLines(org.eclipse.jgit.patch.FileHeader fileHeader) Splits theFileHeaderstring to a list of strings, one string per header line.
- 
getHeaderLines
- 
getOldPathReturns the old file path associated with theFileHeader, or empty if the file isPatch.ChangeType.ADDEDorPatch.ChangeType.REWRITE.
- 
getNewPathReturns the new file path associated with theFileHeader, or empty if the file isPatch.ChangeType.DELETED.
- 
getChangeTypeReturns the change type associated with the file header.
- 
getPatchType
 
-