Interface SyntaxTrivia

All Superinterfaces:
Tree
All Known Implementing Classes:
InternalSyntaxTrivia

@Beta public interface SyntaxTrivia extends Tree
Represents a Trivia in the SyntaxTree.
Since:
plugin 2.5
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.sonar.plugins.java.api.tree.Tree

    Tree.Kind
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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
    Deprecated, for removal: This API element is subject to removal in a future version.
    for removal, since = 7.3, use range().start().line()

    Methods inherited from interface org.sonar.plugins.java.api.tree.Tree

    accept, firstToken, is, kind, lastToken, parent
  • Method Details

    • comment

      String comment()
    • startLine

      @Deprecated(since="7.3", forRemoval=true) int startLine()
      Deprecated, for removal: This API element is subject to removal in a future version.
      for removal, since = 7.3, use range().start().line()
    • column

      @Deprecated(since="7.3", forRemoval=true) int 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()