Class TokenLocation

java.lang.Object
org.sonarsource.analyzer.commons.TokenLocation

public class TokenLocation extends Object
A utility class to compute the offsets which should be provided to SonarQube APIs (highlighting, CPD).
  • Constructor Details

    • TokenLocation

      public TokenLocation(int line, int column, String value)
      Constructor which computes end line and column based on the token content.
      Parameters:
      line - the line at which the token starts (lines start at 1)
      column - the column at which the token starts (columns start at 0)
      value - the content of the token
  • Method Details

    • startLine

      public int startLine()
    • startLineOffset

      public int startLineOffset()
    • endLine

      public int endLine()
    • endLineOffset

      public int endLineOffset()