com.fasterxml.jackson.core.JsonLocation )
objections, most commonly to be printed out as part of Exception
messages.
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | _isContentTextual
Marker flag to indicate whether included content is textual or not: this is taken to mean, by default, that a snippet of content may be displayed for exception messages. |
| protected final int | _length
For static content, indicates length of content in the static array. |
| protected final int | _maxRawContentLength
max raw content to return as configured |
| protected final int | _offset
For static content, indicates offset from the beginning of static array. |
| protected final transient Object | _rawContent
Reference to the actual underlying content. |
| public static final int | DEFAULT_MAX_CONTENT_SNIPPET
Deprecated
Since 2.16. Include at most first 500 characters/bytes from contents; should be enough
to give context, but not cause unfortunate side effects in things like
logs.
ErrorReportConfiguration#DEFAULT_MAX_RAW_CONTENT_LENGTH will be used instead.
|
| protected static final ContentReference | REDACTED_CONTENT
As content will be redacted by default in Jackson 2.16 and later, we'll use a new marker reference for slightly different description from "unknown", to indicate explicit removal of source/content reference (as opposed to it missing from not being available or so) |
| private static final long | |
| protected static final ContentReference | UNKNOWN_CONTENT
Constant that may be used when source/target content is not known (or not exposed). |
| Access | Constructor and Description |
|---|---|
| protected | ContentReference(boolean
Whether content is textual (not binary) isContentTextual, Object Contents being referenced rawContent)
Deprecated
Since 2.16.
|
| protected | ContentReference(boolean
Whether content is textual (not binary) isContentTextual, Object Contents being referenced rawContent, int Offset of content within offset, int rawContentLength of content within length)rawContent
Deprecated
Since 2.16.
|
| protected | ContentReference(boolean isContentTextual, Object rawContent, ErrorReportConfiguration errorReportConfiguration)
|
| protected | ContentReference(boolean isContentTextual, Object rawContent, int offset, int length, ErrorReportConfiguration errorReportConfiguration)
|
| Modifier and Type | Method and Description |
|---|---|
| protected int | |
| protected boolean | |
| protected String | |
| protected String | |
| protected String | |
| protected void | |
| public StringBuilder | Returns: StringBuilder passed as argument (for call chaining)StringBuilder to append description to sb)Method for appending a "source description" when content represented by this reference is read. |
| public String | Returns: Description constructedMethod for constructing a "source description" when content represented by this reference is read. |
| public static ContentReference | |
| public static ContentReference | |
| public static ContentReference | construct(boolean isContentTextual, Object rawContent, int offset, int length, ErrorReportConfiguration errorReportConfiguration)
|
| public static ContentReference | construct(boolean isContentTextual, Object rawContent, ErrorReportConfiguration errorReportConfiguration)
|
| public int | |
| public int | |
| 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 Object | |
| public int | |
| public boolean | |
| protected int | Returns: Maximum content snippet to include before truncatingInternal accessor, overridable, used for checking length (in units in which content is counted, either bytes or chars) to use for truncation (so as not to include full content for humongous sources or targets) |
| public static ContentReference | Returns: Instance with minimal information about content (basically just raw content reference without offsetsIs raw content assumed to have textual content
( isContentTextual, Object true) or binary (false)Underlying raw content access rawContent)Factory method for legacy code to use for constructing instances to content about which only minimal amount of information is available. |
| public static ContentReference | |
| private void | |
| protected Object | |
| public static ContentReference | |
| public static ContentReference | Returns: Placeholder "unknown" (or "empty") instance to use instead ofnull referenceAccessor for getting a placeholder for cases where actual content is not known (or is not something that system wants to expose). |
| private void |
| _isContentTextual | back to summary |
|---|---|
| protected final boolean _isContentTextual Marker flag to indicate whether included content is textual or not: this is taken to mean, by default, that a snippet of content may be displayed for exception messages. | |
| _length | back to summary |
|---|---|
| protected final int _length For static content, indicates length of content in
the static array.
| |
| _maxRawContentLength | back to summary |
|---|---|
| protected final int _maxRawContentLength max raw content to return as configured
| |
| _offset | back to summary |
|---|---|
| protected final int _offset For static content, indicates offset from the beginning
of static array.
| |
| _rawContent | back to summary |
|---|---|
| protected final transient Object _rawContent Reference to the actual underlying content. | |
| DEFAULT_MAX_CONTENT_SNIPPET | back to summary |
|---|---|
| public static final int DEFAULT_MAX_CONTENT_SNIPPET
Deprecated Since 2.16. Include at most first 500 characters/bytes from contents; should be enough to give context, but not cause unfortunate side effects in things like logs.
| |
| REDACTED_CONTENT | back to summary |
|---|---|
| protected static final ContentReference REDACTED_CONTENT As content will be redacted by default in Jackson 2.16 and later, we'll use a new marker reference for slightly different description from "unknown", to indicate explicit removal of source/content reference (as opposed to it missing from not being available or so)
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| UNKNOWN_CONTENT | back to summary |
|---|---|
| protected static final ContentReference UNKNOWN_CONTENT Constant that may be used when source/target content is not known (or not exposed). Note As of 2.13 assume to contain Binary content, meaning that no content snippets will be included. | |
| ContentReference | back to summary |
|---|---|
| protected ContentReference(boolean isContentTextual, Object rawContent)
Deprecated Since 2.16. Use
| |
| ContentReference | back to summary |
|---|---|
| protected ContentReference(boolean isContentTextual, Object rawContent, int offset, int length)
Deprecated Since 2.16. Use
| |
| ContentReference | back to summary |
|---|---|
| protected ContentReference(boolean isContentTextual, Object rawContent, ErrorReportConfiguration errorReportConfiguration) | |
| ContentReference | back to summary |
|---|---|
| protected ContentReference(boolean isContentTextual, Object rawContent, int offset, int length, ErrorReportConfiguration errorReportConfiguration) | |
| _append | back to summary |
|---|---|
| protected int _append(StringBuilder sb, String content) | |
| _appendEscaped | back to summary |
|---|---|
| protected boolean _appendEscaped(StringBuilder sb, int ctrlChar) | |
| _truncate | back to summary |
|---|---|
| protected String _truncate(CharSequence cs, int[] offsets, int maxSnippetLen) | |
| _truncate | back to summary |
|---|---|
| protected String _truncate(char[] cs, int[] offsets, int maxSnippetLen) | |
| _truncate | back to summary |
|---|---|
| protected String _truncate(byte[] b, int[] offsets, int maxSnippetLen) | |
| _truncateOffsets | back to summary |
|---|---|
| protected void _truncateOffsets(int[] offsets, int actualLength) | |
| appendSourceDescription | back to summary |
|---|---|
| public StringBuilder appendSourceDescription(StringBuilder sb) Method for appending a "source description" when content represented by this reference is read.
| |
| buildSourceDescription | back to summary |
|---|---|
| public String buildSourceDescription() Method for constructing a "source description" when content represented by this reference is read.
| |
| construct | back to summary |
|---|---|
| public static ContentReference construct(boolean isContentTextual, Object rawContent)
Deprecated Since 2.16. Use
| |
| construct | back to summary |
|---|---|
| public static ContentReference construct(boolean isContentTextual, Object rawContent, int offset, int length)
Deprecated Since 2.16. Use
| |
| construct | back to summary |
|---|---|
public static ContentReference construct(boolean isContentTextual, Object rawContent, int offset, int length, ErrorReportConfiguration errorReportConfiguration)
| |
| construct | back to summary |
|---|---|
public static ContentReference construct(boolean isContentTextual, Object rawContent, ErrorReportConfiguration errorReportConfiguration)
| |
| contentLength | back to summary |
|---|---|
| public int contentLength() | |
| contentOffset | back to summary |
|---|---|
| public int contentOffset() | |
| 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. | |
| getRawContent | back to summary |
|---|---|
| public Object getRawContent() | |
| 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
| |
| hasTextualContent | back to summary |
|---|---|
| public boolean hasTextualContent() | |
| maxRawContentLength | back to summary |
|---|---|
| protected int maxRawContentLength() Internal accessor, overridable, used for checking length (in units in which content is counted, either bytes or chars) to use for truncation (so as not to include full content for humongous sources or targets)
| |
| rawReference | back to summary |
|---|---|
| public static ContentReference rawReference(boolean isContentTextual, Object rawContent) Factory method for legacy code to use for constructing instances to content about which only minimal amount of information is available. Assumed not to contain textual content (no snippet displayed).
| |
| rawReference | back to summary |
|---|---|
| public static ContentReference rawReference(Object rawContent) | |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException | |
| readResolve | back to summary |
|---|---|
| protected Object readResolve() | |
| redacted | back to summary |
|---|---|
| public static ContentReference redacted() Accessor for getting a placeholder when actual content
is not to be exposed: different from
| |
| unknown | back to summary |
|---|---|
| public static ContentReference unknown() Accessor for getting a placeholder for cases where actual content is not known (or is not something that system wants to expose).
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream out) throws IOException | |