Class TextLine

java.lang.Object
codeanalysis.text.TextLine

public class TextLine extends Object
The TextLine class represents a line of text in a source file. It defines the start position, length, and end position of the line.
Version:
1.0
Author:
Siyabend Urun
See Also:
  • Constructor Details

    • TextLine

      public TextLine(SourceText text, int start, int length, int lengthIncludingLineBreak)
      Creates a new instance of the TextLine class with the specified start position, length, and length including line break.
      Parameters:
      text - The source text.
      start - The start position of the text line.
      length - The length of the text line.
      lengthIncludingLineBreak - The length of the text line including line break.
  • Method Details

    • getText

      public SourceText getText()
      Retrieves the source text.
      Returns:
      The source text.
    • getStart

      public int getStart()
      Retrieves the start position of the text line.
      Returns:
      The start position.
    • getLength

      public int getLength()
      Retrieves the length of the text line.
      Returns:
      The length.
    • getEnd

      public int getEnd()
      Retrieves the end position of the text line.
      Returns:
      The end position.
    • getLengthIncludingLineBreak

      public int getLengthIncludingLineBreak()
      Retrieves the length of the text line including line break.
      Returns:
      The length including line break.
    • getSpan

      public TextSpan getSpan()
      Retrieves the span of the text line.
      Returns:
      The span.
    • getSpanIncludingLineBreak

      public TextSpan getSpanIncludingLineBreak()
      Retrieves the span of the text line including line break.
      Returns:
      The span including line break.
    • toString

      public String toString()
      Retrieves the string representation of the text line.
      Overrides:
      toString in class Object
      Returns:
      The text.