Class JsonLocationImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      JsonLocationImpl​(long lineNo, long columnNo, long streamOffset)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getColumnNumber()
      Return the column number for the current JSON event in the input source.
      long getLineNumber()
      Return the line number for the current JSON event in the input source.
      long getStreamOffset()
      Return the stream offset into the input source this location is pointing to.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • columnNo

        private final long columnNo
      • lineNo

        private final long lineNo
      • offset

        private final long offset
    • Constructor Detail

      • JsonLocationImpl

        JsonLocationImpl​(long lineNo,
                         long columnNo,
                         long streamOffset)
    • Method Detail

      • getLineNumber

        public long getLineNumber()
        Description copied from interface: JsonLocation
        Return the line number for the current JSON event in the input source.
        Specified by:
        getLineNumber in interface JsonLocation
        Returns:
        the line number or -1 if none is available
      • getColumnNumber

        public long getColumnNumber()
        Description copied from interface: JsonLocation
        Return the column number for the current JSON event in the input source.
        Specified by:
        getColumnNumber in interface JsonLocation
        Returns:
        the column number or -1 if none is available
      • getStreamOffset

        public long getStreamOffset()
        Description copied from interface: JsonLocation
        Return the stream offset into the input source this location is pointing to. If the input source is a file or a byte stream then this is the byte offset into that stream, but if the input source is a character media then the offset is the character offset. Returns -1 if there is no offset available.
        Specified by:
        getStreamOffset in interface JsonLocation
        Returns:
        the offset of input source stream, or -1 if there is no offset available
      • toString

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