Package org.sonarsource.analyzer.commons
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 Summary
Constructors Constructor Description TokenLocation(int line, int column, String value)Constructor which computes end line and column based on the token content.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intendLine()intendLineOffset()intstartLine()intstartLineOffset()
-
-
-
Constructor Detail
-
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
-
-