Package com.google.gerrit.entities
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 Summary
Constructors Constructor Description CommentContext()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
contentType()
Content type of the source file.static CommentContext
create(com.google.common.collect.ImmutableMap<Integer,String> lines, String contentType)
static CommentContext
empty()
abstract com.google.common.collect.ImmutableMap<Integer,String>
lines()
Map of {line number, line text} of the context lines of a comment
-
-
-
Method Detail
-
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()
-
-