public class ContentReference
extends java.lang.Object
implements java.io.Serializable
JsonLocation
)
objections, most commonly to be printed out as part of Exception
messages.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_CONTENT_SNIPPET
Deprecated.
Since 2.16.
ErrorReportConfiguration.DEFAULT_MAX_RAW_CONTENT_LENGTH will be used instead. |
Modifier and Type | Method and Description |
---|---|
java.lang.StringBuilder |
appendSourceDescription(java.lang.StringBuilder sb)
Method for appending a "source description" when content represented
by this reference is read.
|
java.lang.String |
buildSourceDescription()
Method for constructing a "source description" when content represented
by this reference is read.
|
static ContentReference |
construct(boolean isContentTextual,
java.lang.Object rawContent)
Deprecated.
Since 2.16. Use
construct(boolean, Object, ErrorReportConfiguration) instead. |
static ContentReference |
construct(boolean isContentTextual,
java.lang.Object rawContent,
ErrorReportConfiguration errorReportConfiguration) |
static ContentReference |
construct(boolean isContentTextual,
java.lang.Object rawContent,
int offset,
int length)
Deprecated.
Since 2.16. Use
construct(boolean, Object, int, int, ErrorReportConfiguration) instead. |
static ContentReference |
construct(boolean isContentTextual,
java.lang.Object rawContent,
int offset,
int length,
ErrorReportConfiguration errorReportConfiguration) |
int |
contentLength() |
int |
contentOffset() |
boolean |
equals(java.lang.Object other) |
java.lang.Object |
getRawContent() |
int |
hashCode() |
boolean |
hasTextualContent() |
static ContentReference |
rawReference(boolean isContentTextual,
java.lang.Object rawContent)
Factory method for legacy code to use for constructing instances to
content about which only minimal amount of information is available.
|
static ContentReference |
rawReference(java.lang.Object rawContent) |
static ContentReference |
redacted()
Accessor for getting a placeholder when actual content
is not to be exposed: different from
unknown() where
content is not available to be referenced. |
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).
|
@Deprecated public static final int DEFAULT_MAX_CONTENT_SNIPPET
ErrorReportConfiguration.DEFAULT_MAX_RAW_CONTENT_LENGTH
will be used instead.public static ContentReference unknown()
null
referencepublic static ContentReference redacted()
unknown()
where
content is not available to be referenced.@Deprecated public static ContentReference construct(boolean isContentTextual, java.lang.Object rawContent)
construct(boolean, Object, ErrorReportConfiguration)
instead.@Deprecated public static ContentReference construct(boolean isContentTextual, java.lang.Object rawContent, int offset, int length)
construct(boolean, Object, int, int, ErrorReportConfiguration)
instead.public static ContentReference construct(boolean isContentTextual, java.lang.Object rawContent, int offset, int length, ErrorReportConfiguration errorReportConfiguration)
public static ContentReference construct(boolean isContentTextual, java.lang.Object rawContent, ErrorReportConfiguration errorReportConfiguration)
public static ContentReference rawReference(boolean isContentTextual, java.lang.Object rawContent)
isContentTextual
- Is raw content assumed to have textual content
(true
) or binary (false
)rawContent
- Underlying raw content accesspublic static ContentReference rawReference(java.lang.Object rawContent)
public boolean hasTextualContent()
public java.lang.Object getRawContent()
public int contentOffset()
public int contentLength()
public java.lang.String buildSourceDescription()
public java.lang.StringBuilder appendSourceDescription(java.lang.StringBuilder sb)
sb
- StringBuilder to append description topublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2010 - 2024 Adobe. All Rights Reserved