Class CommentForValidation
- java.lang.Object
- 
- com.google.gerrit.extensions.validators.CommentForValidation
 
- 
 public abstract class CommentForValidation extends Object Holds a comment's text and some metadata in order to pass it to a validation plugin.- See Also:
- CommentValidator
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classCommentForValidation.CommentSourceThe creator of the comment.static classCommentForValidation.CommentTypeThe type of comment.
 - 
Constructor SummaryConstructors Constructor Description CommentForValidation()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CommentForValidationcreate(CommentForValidation.CommentSource source, CommentForValidation.CommentType type, String text, int size)CommentValidationFailurefailValidation(String message)abstract intgetApproximateSize()Returns this instance's approximate size in bytes for the purpose of applying size limits.abstract CommentForValidation.CommentSourcegetSource()abstract StringgetText()Returns the comment text.abstract CommentForValidation.CommentTypegetType()
 
- 
- 
- 
Method Detail- 
createpublic static CommentForValidation create(CommentForValidation.CommentSource source, CommentForValidation.CommentType type, String text, int size) 
 - 
getSourcepublic abstract CommentForValidation.CommentSource getSource() 
 - 
getTypepublic abstract CommentForValidation.CommentType getType() 
 - 
getTextpublic abstract String getText() Returns the comment text. Note that especially for robot comments the total size may be significantly larger and should be determined by usinggetApproximateSize().
 - 
getApproximateSizepublic abstract int getApproximateSize() Returns this instance's approximate size in bytes for the purpose of applying size limits. For robot comments this may be significantly larger than the size of the comment text.
 - 
failValidationpublic CommentValidationFailure failValidation(String message) 
 
- 
 
-