Class FilePosition


  • public final class FilePosition
    extends java.lang.Object
    Represents a position in a source file.
    • Constructor Summary

      Constructors 
      Constructor Description
      FilePosition​(int line, int column)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumn()  
      int getLine()
      Returns the line number of this position.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FilePosition

        public FilePosition​(int line,
                            int column)
    • Method Detail

      • getLine

        public int getLine()
        Returns the line number of this position. Note: The v1 and v2 source maps use a line number with the first line being 1, whereas the v3 source map corrects this and uses a first line number of 0 to be consistent with the column representation.
      • getColumn

        public int getColumn()
        Returns:
        the character index on the line of this position, with the first column being 0.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object