Package org.sonar.plugins.java.api.tree
Interface SyntaxToken
- All Superinterfaces:
Tree
- All Known Implementing Classes:
InternalSyntaxToken
,ModifierKeywordTreeImpl
Represents a token in the syntax tree.
- Since:
- plugin 2.4
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
column()
Deprecated, for removal: This API element is subject to removal in a future version.for removal, since = 7.3, "column()" can be replaced by range().start().columnOffset() and "column() + 1" can be replaced by range().start().column()int
line()
Deprecated, for removal: This API element is subject to removal in a future version.for removal, since = 7.3, use "range().start().line()".range()
text()
trivias()
-
Method Details
-
text
String text() -
trivias
List<SyntaxTrivia> trivias() -
line
Deprecated, for removal: This API element is subject to removal in a future version.for removal, since = 7.3, use "range().start().line()". A token is not anymore on a single line since the text block feature has been introduced in the java language.- Returns:
- line number starting at 1
-
column
Deprecated, for removal: This API element is subject to removal in a future version.for removal, since = 7.3, "column()" can be replaced by range().start().columnOffset() and "column() + 1" can be replaced by range().start().column()Warning: this is not the column number starting at 1 but the column offset starting at 0- Returns:
- column offset starting at 0
-
range
Range range()
-