Package com.google.gerrit.server.patch
Class MagicFile
- java.lang.Object
- 
- com.google.gerrit.server.patch.MagicFile
 
- 
 public abstract class MagicFile extends Object Representation of a magic file which appears as a file with content to Gerrit users.
- 
- 
Constructor SummaryConstructors Constructor Description MagicFile()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static MagicFileforCommitMessage(org.eclipse.jgit.lib.ObjectReader reader, org.eclipse.jgit.lib.AnyObjectId commitId)static MagicFileforMergeList(ComparisonType comparisonType, org.eclipse.jgit.lib.ObjectReader reader, org.eclipse.jgit.lib.AnyObjectId commitId)abstract StringgeneratedContent()Generated part of the file.StringgetFileContent()Whole content of the file as it appears to users.intgetStartLineOfModifiableContent()Returns the start line of the modifiable content.abstract StringmodifiableContent()Non-generated part of the file.
 
- 
- 
- 
Method Detail- 
forCommitMessagepublic static MagicFile forCommitMessage(org.eclipse.jgit.lib.ObjectReader reader, org.eclipse.jgit.lib.AnyObjectId commitId) throws IOException - Throws:
- IOException
 
 - 
forMergeListpublic static MagicFile forMergeList(ComparisonType comparisonType, org.eclipse.jgit.lib.ObjectReader reader, org.eclipse.jgit.lib.AnyObjectId commitId) throws IOException - Throws:
- IOException
 
 - 
generatedContentpublic abstract String generatedContent() Generated part of the file. Any generated contents should go here. Can be empty.
 - 
modifiableContentpublic abstract String modifiableContent() Non-generated part of the file. This should correspond to some actual content derived from somewhere else which can also be modified (e.g. by suggested fixes). Can be empty.
 - 
getFileContentpublic String getFileContent() Whole content of the file as it appears to users.
 - 
getStartLineOfModifiableContentpublic int getStartLineOfModifiableContent() Returns the start line of the modifiable content. Assumes that line counting starts at 1.
 
- 
 
-