Package com.google.googlejavaformat.java
Class JavacTokens.CommentWithTextAndPosition
- java.lang.Object
-
- com.google.googlejavaformat.java.JavacTokens.CommentWithTextAndPosition
-
- Enclosing class:
- JavacTokens
static class JavacTokens.CommentWithTextAndPosition extends java.lang.ObjectATokens.Commentthat saves its text and start position.
-
-
Constructor Summary
Constructors Constructor Description CommentWithTextAndPosition(int pos, int endPos, java.lang.String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetSourcePos(int index)Returns the source position of the character at indexindexin the comment text.java.lang.StringgetText()java.lang.StringtoString()
-
-
-
Method Detail
-
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
public java.lang.String getText()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-