Class ErrorProneTokens

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

public class ErrorProneTokens extends Object
A utility for tokenizing and preserving comments.
  • Constructor Details

    • ErrorProneTokens

      public ErrorProneTokens(String source, com.sun.tools.javac.util.Context context)
    • ErrorProneTokens

      public ErrorProneTokens(String source, int offset, com.sun.tools.javac.util.Context context)
  • Method Details

    • getLineMap

      public com.sun.tools.javac.util.Position.LineMap getLineMap()
    • getTokens

      public com.google.common.collect.ImmutableList<ErrorProneToken> getTokens()
    • getTokens

      public static com.google.common.collect.ImmutableList<ErrorProneToken> getTokens(String source, com.sun.tools.javac.util.Context context)
      Returns the tokens for the given source text, including comments.
    • getTokens

      public static com.google.common.collect.ImmutableList<ErrorProneToken> getTokens(String source, int offset, com.sun.tools.javac.util.Context context)
      Returns the tokens for the given source text, including comments, indicating the offset of the source within the overall file.