Class 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 Detail

      • RevisionNote

        public RevisionNote​(org.eclipse.jgit.lib.ObjectReader reader,
                            org.eclipse.jgit.lib.ObjectId noteId)
    • 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 the parse(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()