com.fasterxml.aalto.impl

## 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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `_charOffset`
    `protected int` | `_col`
    `protected String` | `_desc`
    `protected String` | `_publicId`
    `protected int` | `_row`
    `protected String` | `_systemId`

    - ### Fields inherited from interface org.codehaus.stax2.XMLStreamLocation2

      `NOT_AVAILABLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocationImpl(String pubId, String sysId, int charOffset, int row, int col)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `int` | `getCharacterOffset()`
    `int` | `getColumnNumber()`
    `org.codehaus.stax2.XMLStreamLocation2` | `getContext()`
    `static LocationImpl` | `getEmptyLocation()`
    `int` | `getLineNumber()`
    `String` | `getPublicId()`
    `String` | `getSystemId()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### _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 Detail

    - #### LocationImpl

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

  - ### Method Detail

    - #### 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`

Copyright © 2012-2015 FasterXML. All Rights Reserved.