Class JavacTokens.CommentSavingTokenizer

java.lang.Object
com.sun.tools.javac.parser.UnicodeReader
com.sun.tools.javac.parser.JavaTokenizer
com.google.googlejavaformat.java.JavacTokens.CommentSavingTokenizer
Enclosing class:
JavacTokens

static class JavacTokens.CommentSavingTokenizer extends com.sun.tools.javac.parser.JavaTokenizer
A JavaTokenizer that saves comments.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.sun.tools.javac.parser.JavaTokenizer

    com.sun.tools.javac.parser.JavaTokenizer.BasicComment
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Map<com.sun.tools.javac.parser.Tokens.Comment,JavacTokens.CommentWithTextAndPosition>
     

    Fields inherited from class com.sun.tools.javac.parser.JavaTokenizer

    errPos, fac, fragmentRanges, hasEscapeSequences, hasStringTemplateErrors, isStringTemplate, isTextBlock, lint, name, pendingTokens, radix, sb, tk
  • Constructor Summary

    Constructors
    Constructor
    Description
    CommentSavingTokenizer(com.sun.tools.javac.parser.ScannerFactory fac, char[] buffer, int length)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) Map<com.sun.tools.javac.parser.Tokens.Comment,JavacTokens.CommentWithTextAndPosition>
     
    private char[]
    getRawCharactersReflectively(int beginIndex, int endIndex)
     
    protected com.sun.tools.javac.parser.Tokens.Comment
    processComment(int pos, int endPos, com.sun.tools.javac.parser.Tokens.Comment.CommentStyle style)
     

    Methods inherited from class com.sun.tools.javac.parser.JavaTokenizer

    acceptOneOfThenPut, acceptThenPut, checkSourceLevel, errPos, errPos, getLineMap, lexError, lexError, lexWarning, processLineTerminator, processWhiteSpace, put, put, put, putCodePoint, putThenNext, readToken

    Methods inherited from class com.sun.tools.javac.parser.UnicodeReader

    accept, accept, acceptOneOf, acceptOneOf, buffer, digit, get, getCodepoint, getRawCharacters, getRawCharacters, getRawString, getRawString, inRange, is, isASCII, isAvailable, isEOLN, isOneOf, isOneOf, isOneOf, isOneOf, isSurrogate, isWhitespace, length, lineReader, lineReader, next, position, reset, skip, skipToEOLN, skipWhitespace

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • CommentSavingTokenizer

      CommentSavingTokenizer(com.sun.tools.javac.parser.ScannerFactory fac, char[] buffer, int length)
  • Method Details

    • comments

      Map<com.sun.tools.javac.parser.Tokens.Comment,JavacTokens.CommentWithTextAndPosition> comments()
    • processComment

      protected com.sun.tools.javac.parser.Tokens.Comment processComment(int pos, int endPos, com.sun.tools.javac.parser.Tokens.Comment.CommentStyle style)
      Overrides:
      processComment in class com.sun.tools.javac.parser.JavaTokenizer
    • getRawCharactersReflectively

      private char[] getRawCharactersReflectively(int beginIndex, int endIndex)