public class JsonLocation
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
(package private) int |
_columnNr |
(package private) int |
_lineNr |
(package private) java.lang.Object |
_sourceRef
Displayable description for input source: file path, URL.
|
(package private) long |
_totalBytes |
(package private) long |
_totalChars |
static JsonLocation |
NA
Shared immutable "N/A location" that can be returned to indicate
that no location information is available
|
private static long |
serialVersionUID |
Constructor and Description |
---|
JsonLocation(java.lang.Object srcRef,
long totalChars,
int lineNr,
int colNr) |
JsonLocation(java.lang.Object sourceRef,
long totalBytes,
long totalChars,
int lineNr,
int columnNr) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
long |
getByteOffset() |
long |
getCharOffset() |
int |
getColumnNr() |
int |
getLineNr() |
java.lang.Object |
getSourceRef()
Reference to the original resource being read, if one available.
|
int |
hashCode() |
java.lang.String |
toString() |
private static final long serialVersionUID
public static final JsonLocation NA
final long _totalBytes
final long _totalChars
final int _lineNr
final int _columnNr
final transient java.lang.Object _sourceRef
NOTE: transient
since 2.2 so that Location itself is Serializable.
public JsonLocation(java.lang.Object srcRef, long totalChars, int lineNr, int colNr)
public JsonLocation(java.lang.Object sourceRef, long totalBytes, long totalChars, int lineNr, int columnNr)
public java.lang.Object getSourceRef()
File
instance, this method would return
that File. Will return null if no such reference is available,
for example when InputStream
was used to
construct the parser instance.public int getLineNr()
public int getColumnNr()
public long getCharOffset()
public long getByteOffset()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object