Class ErrorProneComment

java.lang.Object
com.google.errorprone.util.ErrorProneComment

public final class ErrorProneComment extends Object
Wraps a Tokens.Comment to allow an offset source position to be reported.
  • Method Details

    • withOffset

      public ErrorProneComment withOffset(int offset)
    • getPos

      public int getPos()
    • getEndPos

      public int getEndPos()
    • getSourcePos

      public int getSourcePos(int index)
      Returns the source position of the character at index index 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

      public String getText()
    • isDeprecated

      public boolean isDeprecated()
      We don't care about @deprecated javadoc tags (see the DepAnn check).
      Returns:
      false
    • toString

      public String toString()
      Overrides:
      toString in class Object