Class JavacTokens.RawTok

java.lang.Object
com.google.googlejavaformat.java.JavacTokens.RawTok
Enclosing class:
JavacTokens

static class JavacTokens.RawTok extends Object
An unprocessed input token, including whitespace and comments.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
    private final com.sun.tools.javac.parser.Tokens.TokenKind
     
    private final int
     
    private final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RawTok(String stringVal, com.sun.tools.javac.parser.Tokens.TokenKind kind, int pos, int endPos)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The end position.
    com.sun.tools.javac.parser.Tokens.TokenKind
    The token kind, or null for whitespace and comments.
    int
    pos()
    The start position.
    The escaped string value of a literal, or null for other tokens.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • stringVal

      private final String stringVal
    • kind

      private final com.sun.tools.javac.parser.Tokens.TokenKind kind
    • pos

      private final int pos
    • endPos

      private final int endPos
  • Constructor Details

    • RawTok

      RawTok(String stringVal, com.sun.tools.javac.parser.Tokens.TokenKind kind, int pos, int endPos)
  • Method Details

    • kind

      public com.sun.tools.javac.parser.Tokens.TokenKind kind()
      The token kind, or null for whitespace and comments.
    • pos

      public int pos()
      The start position.
    • endPos

      public int endPos()
      The end position.
    • stringVal

      public String stringVal()
      The escaped string value of a literal, or null for other tokens.