Class LineMap


  • public class LineMap
    extends java.lang.Object
    Converts source positions to line and column information, for diagnostic formatting.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int column​(int position)
      The zero-indexed column number of the given source position.
      static LineMap create​(java.lang.String source)  
      java.lang.String line​(int position)
      The one-indexed line of the given source position.
      int lineNumber​(int position)
      The one-indexed line number of the given source position.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static LineMap create​(java.lang.String source)
      • column

        public int column​(int position)
        The zero-indexed column number of the given source position.
      • lineNumber

        public int lineNumber​(int position)
        The one-indexed line number of the given source position.
      • line

        public java.lang.String line​(int position)
        The one-indexed line of the given source position.