public class LocationImpl
extends java.lang.Object
implements org.codehaus.stax2.XMLStreamLocation2
XMLStreamLocation2
, used by stream
readers and writers.Modifier and Type | Field and 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 and Description |
---|
LocationImpl(java.lang.String pubId,
java.lang.String sysId,
int charOffset,
int row,
int col) |
Modifier and Type | Method and 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() |
private static final LocationImpl EMPTY
protected final java.lang.String _publicId
protected final java.lang.String _systemId
protected final int _charOffset
protected final int _col
protected final int _row
protected transient java.lang.String _desc
public LocationImpl(java.lang.String pubId, java.lang.String sysId, int charOffset, int row, int col)
public static LocationImpl fromZeroBased(java.lang.String pubId, java.lang.String sysId, long rawOffset, int rawRow, int rawCol)
public static LocationImpl getEmptyLocation()
public int getCharacterOffset()
getCharacterOffset
in interface javax.xml.stream.Location
public int getColumnNumber()
getColumnNumber
in interface javax.xml.stream.Location
public int getLineNumber()
getLineNumber
in interface javax.xml.stream.Location
public java.lang.String getPublicId()
getPublicId
in interface javax.xml.stream.Location
public java.lang.String getSystemId()
getSystemId
in interface javax.xml.stream.Location
public org.codehaus.stax2.XMLStreamLocation2 getContext()
getContext
in interface org.codehaus.stax2.XMLStreamLocation2
public java.lang.String toString()
toString
in class java.lang.Object
private void appendDesc(java.lang.StringBuffer sb)