Package com.google.googlejavaformat.java
Class JavacTokens.CommentWithTextAndPosition
java.lang.Object
com.google.googlejavaformat.java.JavacTokens.CommentWithTextAndPosition
- Enclosing class:
JavacTokens
A
Tokens.Comment that saves its text and start position.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetSourcePos(int index) Returns the source position of the character at indexindexin the comment text.getText()toString()
-
Field Details
-
pos
private final int pos -
endPos
private final int endPos -
text
-
-
Constructor Details
-
CommentWithTextAndPosition
-
-
Method Details
-
getSourcePos
public int getSourcePos(int index) Returns the source position of the character at indexindexin 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.
-
getText
-
toString
-