Package com.google.gerrit.server.notedb
Class RevisionNote<T>
- java.lang.Object
-
- com.google.gerrit.server.notedb.RevisionNote<T>
-
- Direct Known Subclasses:
RobotCommentsRevisionNote
public abstract class RevisionNote<T> extends Object
Data stored in a note, parsed on demand. The data type to parse into is a generic list of type T. The source of the data is a array of raw bytes
-
-
Constructor Summary
Constructors Constructor Description RevisionNote(org.eclipse.jgit.lib.ObjectReader reader, org.eclipse.jgit.lib.ObjectId noteId)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
checkParsed()
com.google.common.collect.ImmutableList<T>
getEntities()
T
getOnlyEntity()
byte[]
getRaw()
void
parse()
Reads the raw data, and delegates parsing to theparse(byte[], int)
method.protected abstract List<T>
parse(byte[] raw, int offset)
protected static void
trimLeadingEmptyLines(byte[] bytes, org.eclipse.jgit.util.MutableInteger p)
-
-
-
Method Detail
-
trimLeadingEmptyLines
protected static void trimLeadingEmptyLines(byte[] bytes, org.eclipse.jgit.util.MutableInteger p)
-
getRaw
public byte[] getRaw()
-
getOnlyEntity
public T getOnlyEntity()
-
getEntities
public com.google.common.collect.ImmutableList<T> getEntities()
-
parse
public void parse() throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
Reads the raw data, and delegates parsing to theparse(byte[], int)
method.- Throws:
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
parse
protected abstract List<T> parse(byte[] raw, int offset) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
- Throws:
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
checkParsed
protected void checkParsed()
-
-