Class ErrorProneComment
java.lang.Object
com.google.errorprone.util.ErrorProneComment
Wraps a
Tokens.Comment
to allow an offset source position to be reported.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
A compatibility wrapper forTokens.Comment.CommentStyle
. -
Method Summary
Modifier and TypeMethodDescriptionint
int
getPos()
int
getSourcePos
(int index) Returns the source position of the character at indexindex
in the comment text.getStyle()
getText()
boolean
We don't care about@deprecated
javadoc tags (see the DepAnn check).toString()
withOffset
(int offset)
-
Method Details
-
withOffset
-
getPos
public int getPos() -
getEndPos
public int getEndPos() -
getSourcePos
public int getSourcePos(int index) Returns the source position of the character at indexindex
in the comment text.The handling of javadoc comments in javac has more logic to skip over leading whitespace and '*' characters when indexing into doc comments, but we don't need any of that.
-
getStyle
-
getText
-
isDeprecated
public boolean isDeprecated()We don't care about@deprecated
javadoc tags (see the DepAnn check).- Returns:
- false
-
toString
-