Class CommentContext

java.lang.Object
com.google.gerrit.entities.CommentContext

public abstract class CommentContext extends Object
An entity class representing all context lines of a comment.
  • Constructor Details

    • CommentContext

      public CommentContext()
  • Method Details

    • create

      public static CommentContext create(com.google.common.collect.ImmutableMap<Integer,String> lines, String contentType)
    • lines

      public abstract com.google.common.collect.ImmutableMap<Integer,String> lines()
      Map of {line number, line text} of the context lines of a comment
    • contentType

      public abstract String contentType()
      Content type of the source file. Useful for syntax highlighting.
      Returns:
      text/x-gerrit-commit-message if the file is a commit message.

      text/x-gerrit-merge-list if the file is a merge list.

      The content/mime type, e.g. text/x-c++src otherwise.

    • empty

      public static CommentContext empty()