Package org.sonarsource.analyzer.commons
Class TokenLocation
java.lang.Object
org.sonarsource.analyzer.commons.TokenLocation
A utility class to compute the offsets which should be provided to SonarQube APIs (highlighting, CPD).
-
Constructor Summary
ConstructorsConstructorDescriptionTokenLocation(int line, int column, String value) Constructor which computes end line and column based on the token content. -
Method Summary
-
Constructor Details
-
TokenLocation
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()
-