Class LocationImpl

java.lang.Object
com.fasterxml.aalto.impl.LocationImpl
All Implemented Interfaces:
Location, org.codehaus.stax2.XMLStreamLocation2

public class LocationImpl extends Object implements org.codehaus.stax2.XMLStreamLocation2
Basic implementation of XMLStreamLocation2, used by stream readers and writers.
  • Field Details

    • EMPTY

      private static final LocationImpl EMPTY
    • _publicId

      protected final String _publicId
    • _systemId

      protected final String _systemId
    • _charOffset

      protected final int _charOffset
    • _col

      protected final int _col
    • _row

      protected final int _row
    • _desc

      protected transient String _desc
  • Constructor Details

    • LocationImpl

      public LocationImpl(String pubId, String sysId, int charOffset, int row, int col)
  • Method Details

    • fromZeroBased

      public static LocationImpl fromZeroBased(String pubId, String sysId, long rawOffset, int rawRow, int rawCol)
      Helper method that will adjust given internal zero-based values to 1-based values that should be externally visible.
    • getEmptyLocation

      public static LocationImpl getEmptyLocation()
    • getCharacterOffset

      public int getCharacterOffset()
      Specified by:
      getCharacterOffset in interface Location
    • getColumnNumber

      public int getColumnNumber()
      Specified by:
      getColumnNumber in interface Location
    • getLineNumber

      public int getLineNumber()
      Specified by:
      getLineNumber in interface Location
    • getPublicId

      public String getPublicId()
      Specified by:
      getPublicId in interface Location
    • getSystemId

      public String getSystemId()
      Specified by:
      getSystemId in interface Location
    • getContext

      public org.codehaus.stax2.XMLStreamLocation2 getContext()
      Specified by:
      getContext in interface org.codehaus.stax2.XMLStreamLocation2
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • appendDesc

      private void appendDesc(StringBuffer sb)