Package com.fasterxml.aalto.impl
Class LocationImpl
- java.lang.Object
-
- com.fasterxml.aalto.impl.LocationImpl
-
- All Implemented Interfaces:
javax.xml.stream.Location
,org.codehaus.stax2.XMLStreamLocation2
public class LocationImpl extends java.lang.Object implements org.codehaus.stax2.XMLStreamLocation2
Basic implementation ofXMLStreamLocation2
, used by stream readers and writers.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
_charOffset
protected int
_col
protected java.lang.String
_desc
protected java.lang.String
_publicId
protected int
_row
protected java.lang.String
_systemId
private static LocationImpl
EMPTY
-
Constructor Summary
Constructors Constructor Description LocationImpl(java.lang.String pubId, java.lang.String sysId, int charOffset, int row, int col)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
appendDesc(java.lang.StringBuffer sb)
static LocationImpl
fromZeroBased(java.lang.String pubId, java.lang.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()
java.lang.String
getPublicId()
java.lang.String
getSystemId()
java.lang.String
toString()
-
-
-
Field Detail
-
EMPTY
private static final LocationImpl EMPTY
-
_publicId
protected final java.lang.String _publicId
-
_systemId
protected final java.lang.String _systemId
-
_charOffset
protected final int _charOffset
-
_col
protected final int _col
-
_row
protected final int _row
-
_desc
protected transient java.lang.String _desc
-
-
Method Detail
-
fromZeroBased
public static LocationImpl fromZeroBased(java.lang.String pubId, java.lang.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 interfacejavax.xml.stream.Location
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interfacejavax.xml.stream.Location
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interfacejavax.xml.stream.Location
-
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicId
in interfacejavax.xml.stream.Location
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId
in interfacejavax.xml.stream.Location
-
getContext
public org.codehaus.stax2.XMLStreamLocation2 getContext()
- Specified by:
getContext
in interfaceorg.codehaus.stax2.XMLStreamLocation2
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
appendDesc
private void appendDesc(java.lang.StringBuffer sb)
-
-