TokenStreamFactory (such as
JsonFactory); if nothing explicitly specified, default
constraints are used.
Currently constrained aspects, with default settings, are:
DEFAULT_MAX_DEPTH)
| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final int | |
| private static StreamWriteConstraints | |
| public static final int | DEFAULT_MAX_DEPTH
Default setting for maximum depth: see |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected String | |
| protected StreamConstraintsException | |
| public static StreamWriteConstraints. | |
| public static StreamWriteConstraints | |
| public int | |
| public static void | overrideDefaultStreamWriteConstraints(final StreamWriteConstraints
new default for StreamWriteConstraints (a null value will reset to built-in default) streamWriteConstraints)Override the default StreamWriteConstraints. |
| public StreamWriteConstraints. | |
| public void | validateNestingDepth(int
count of unclosed objects and arrays depth)Convenience method that can be used to verify that the
nesting depth does not exceed the maximum specified by this
constraints object: if it does, a
|
| _maxNestingDepth | back to summary |
|---|---|
| protected final int _maxNestingDepth | |
| DEFAULT | back to summary |
|---|---|
| private static StreamWriteConstraints DEFAULT | |
| DEFAULT_MAX_DEPTH | back to summary |
|---|---|
| public static final int DEFAULT_MAX_DEPTH Default setting for maximum depth: see | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| StreamWriteConstraints | back to summary |
|---|---|
| protected StreamWriteConstraints(final int maxNestingDepth) | |
| _constrainRef | back to summary |
|---|---|
| protected String _constrainRef(String method) | |
| _constructException | back to summary |
|---|---|
| protected StreamConstraintsException _constructException(String msgTemplate, Object... args) throws StreamConstraintsException | |
| builder | back to summary |
|---|---|
| public static StreamWriteConstraints. | |
| defaults | back to summary |
|---|---|
public static StreamWriteConstraints defaults()
| |
| getMaxNestingDepth | back to summary |
|---|---|
| public int getMaxNestingDepth() Accessor for maximum depth.
see
| |
| overrideDefaultStreamWriteConstraints | back to summary |
|---|---|
| public static void overrideDefaultStreamWriteConstraints(final StreamWriteConstraints streamWriteConstraints) Override the default StreamWriteConstraints. These defaults are only used when
Library maintainers should not set this as it will affect other code that uses Jackson.
Library maintainers who want to configure StreamWriteConstraints for the Jackson usage within their
lib should create This method is meant for users delivering applications. If they use this, they set it when they start their application to avoid having other code initialize their mappers before the defaults are overridden.
| |
| rebuild | back to summary |
|---|---|
public StreamWriteConstraints.
| |
| validateNestingDepth | back to summary |
|---|---|
| public void validateNestingDepth(int depth) throws StreamConstraintsException Convenience method that can be used to verify that the
nesting depth does not exceed the maximum specified by this
constraints object: if it does, a
| |
| Modifier and Type | Field and Description |
|---|---|
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public StreamWriteConstraints | |
| public StreamWriteConstraints. | Returns: this builderthe maximum depth maxNestingDepth)Sets the maximum nesting depth. |
| maxNestingDepth | back to summary |
|---|---|
| private int maxNestingDepth | |
| Builder | back to summary |
|---|---|
| pack-priv Builder() | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(final int maxNestingDepth) | |
| Builder | back to summary |
|---|---|
| pack-priv Builder(StreamWriteConstraints src) | |
| build | back to summary |
|---|---|
| public StreamWriteConstraints build() | |
| maxNestingDepth | back to summary |
|---|---|
| public StreamWriteConstraints. Sets the maximum nesting depth. The depth is a count of objects and arrays that have not been closed, `{` and `[` respectively.
| |