Note
users should be careful if using equals implementation as
it may or may not compare underlying "content reference" for equality.
Instead if would make sense to explicitly implementing equality checks
using specific criteria caller desires.
| Modifier and Type | Field and Description |
|---|---|
| protected final int | |
| protected final ContentReference | _contentReference
Reference to input source; never null (but may be that of
|
| protected final int | |
| protected transient String | _sourceDescription
Lazily constructed description for source; constructed if and
when |
| protected final long | |
| protected final long | |
| public static final int | MAX_CONTENT_SNIPPET
Deprecated
Since 2.13 use
ErrorReportConfiguration#DEFAULT_MAX_RAW_CONTENT_LENGTH instead
|
| public static final JsonLocation | NA
Shared immutable "N/A location" that can be returned to indicate that no location information is available. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JsonLocation(ContentReference contentRef, long totalBytes, long totalChars, int lineNr, int columnNr)
|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected static ContentReference | |
| public StringBuilder | |
| public ContentReference | Returns: Object with information about input source.Accessor for information about the original input source content is being read from. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public long | Returns: Byte offset within underlying stream, reader or writer, if available;-1 if not.
|
| public long | Returns: Character offset within underlying stream, reader or writer, if available;-1 if not.
|
| public int | Returns: Column offset of the location (1-based), if available;-1 if not.Access for getting column offset of this location, if available. |
| public int | Returns: Line number of the location (1-based), if available;-1 if not.Access for getting line number of this location, if available. |
| public Object | Returns: Source reference this location was constructed with, if any;null if none
Deprecated
Since 2.13 Use
contentReference instead
Reference to the original resource being read, if one available. |
| public int | |
| public String | Returns: Description of available relevant location offsets; combination of line number and column position or byte offsetAccessor for a brief summary of Location offsets (line number, column position, or byte offset, if available). |
| public String | Returns: Description of the source reference (seegetSourceRef()Accessor for getting a textual description of source reference
(Object returned by |
| public String |
| _columnNr | back to summary |
|---|---|
| protected final int _columnNr | |
| _contentReference | back to summary |
|---|---|
| protected final ContentReference _contentReference Reference to input source; never null (but may be that of
| |
| _lineNr | back to summary |
|---|---|
| protected final int _lineNr | |
| _sourceDescription | back to summary |
|---|---|
| protected transient String _sourceDescription Lazily constructed description for source; constructed if and
when
| |
| _totalBytes | back to summary |
|---|---|
| protected final long _totalBytes | |
| _totalChars | back to summary |
|---|---|
| protected final long _totalChars | |
| MAX_CONTENT_SNIPPET | back to summary |
|---|---|
| public static final int MAX_CONTENT_SNIPPET
Deprecated Since 2.13 use | |
| NA | back to summary |
|---|---|
| public static final JsonLocation NA Shared immutable "N/A location" that can be returned to indicate that no location information is available. Note before 2.9, Location was given as String "N/A"; with 2.9 it was removed so that source should be indicated as "UNKNOWN". | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| JsonLocation | back to summary |
|---|---|
| public JsonLocation(ContentReference contentRef, long totalChars, int lineNr, int colNr) | |
| JsonLocation | back to summary |
|---|---|
| public JsonLocation(ContentReference contentRef, long totalBytes, long totalChars, int lineNr, int columnNr) | |
| JsonLocation | back to summary |
|---|---|
| public JsonLocation(Object srcRef, long totalChars, int lineNr, int columnNr)
Deprecated
| |
| JsonLocation | back to summary |
|---|---|
| public JsonLocation(Object srcRef, long totalBytes, long totalChars, int lineNr, int columnNr)
Deprecated
| |
| _wrap | back to summary |
|---|---|
| protected static ContentReference _wrap(Object srcRef) | |
| appendOffsetDescription | back to summary |
|---|---|
| public StringBuilder appendOffsetDescription(StringBuilder sb) | |
| contentReference | back to summary |
|---|---|
| public ContentReference contentReference() Accessor for information about the original input source content is being
read from. Returned reference is never Note not getter, on purpose, to avoid inlusion if serialized using default Jackson serializer.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getByteOffset | back to summary |
|---|---|
public long getByteOffset()
| |
| getCharOffset | back to summary |
|---|---|
public long getCharOffset()
| |
| getColumnNr | back to summary |
|---|---|
| public int getColumnNr() Access for getting column offset of this location, if available. Note that column position is typically not available for binary formats. Note this returns an offset that is in units of input, so for
| |
| getLineNr | back to summary |
|---|---|
| public int getLineNr() Access for getting line number of this location, if available. Note that line number is typically not available for binary formats.
| |
| getSourceRef | back to summary |
|---|---|
| public Object getSourceRef()
Deprecated Since 2.13 Use Reference to the original resource being read, if one available.
For example, when a parser has been constructed by passing
a
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| offsetDescription | back to summary |
|---|---|
| public String offsetDescription() Accessor for a brief summary of Location offsets (line number, column position, or byte offset, if available).
| |
| sourceDescription | back to summary |
|---|---|
| public String sourceDescription() Accessor for getting a textual description of source reference
(Object returned by Note implementation will simply call
Note not added as a "getter" to prevent it from getting serialized.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |