com.fasterxml.jackson.databind.cfg

## Class ContextAttributes.Impl

- java.lang.Object
- - com.fasterxml.jackson.databind.cfg.ContextAttributes
  - - com.fasterxml.jackson.databind.cfg.ContextAttributes.Impl

- All Implemented Interfaces:
    Serializable
  Enclosing class:
    ContextAttributes

      public static class ContextAttributes.Impl
      extends ContextAttributes
      implements Serializable

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.cfg.ContextAttributes

      `ContextAttributes.Impl`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<Object,Object>` | `_nonShared` Per-call attributes that we can directly modify, since they are not shared between threads.
    `protected Map<?,?>` | `_shared` Shared attributes that we cannot modify in-place.
    `protected static ContextAttributes.Impl` | `EMPTY`
    `protected static Object` | `NULL_SURROGATE`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Impl(Map<?,?> shared)`
    `protected` | `Impl(Map<?,?> shared, Map<Object,Object> nonShared)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getAttribute(Object key)` Accessor for value of specified attribute
    `static ContextAttributes` | `getEmpty()`
    `protected ContextAttributes` | `nonSharedInstance(Object key, Object value)` Overridable method that creates initial non-shared instance, with the first explicit set value.
    `ContextAttributes` | `withoutSharedAttribute(Object key)`
    `ContextAttributes` | `withPerCallAttribute(Object key, Object value)` Mutator used during call (via context) to set value of "non-shared" part of attribute set.
    `ContextAttributes` | `withSharedAttribute(Object key, Object value)`
    `ContextAttributes` | `withSharedAttributes(Map<?,?> shared)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### EMPTY

          protected static final ContextAttributes.Impl EMPTY

    - #### NULL_SURROGATE

          protected static final Object NULL_SURROGATE

    - #### _shared

          protected final Map<?,?> _shared

      Shared attributes that we cannot modify in-place.

    - #### _nonShared

          protected transient Map<Object,Object> _nonShared

      Per-call attributes that we can directly modify, since they are not shared between threads.

      NOTE: typed as Object-to-Object, unlike `_shared`, because we need to be able to modify contents, and wildcard type would complicate that access.

  - ### Constructor Detail

    - #### Impl

          protected Impl(Map<?,?> shared)

    - #### Impl

          protected Impl(Map<?,?> shared,
                         Map<Object,Object> nonShared)

  - ### Method Detail

    - #### getEmpty

          public static ContextAttributes getEmpty()

    - #### withSharedAttribute

          public ContextAttributes withSharedAttribute(Object key,
                                                       Object value)

      Specified by:
        `withSharedAttribute` in class `ContextAttributes`

    - #### withSharedAttributes

          public ContextAttributes withSharedAttributes(Map<?,?> shared)

      Specified by:
        `withSharedAttributes` in class `ContextAttributes`

    - #### withoutSharedAttribute

          public ContextAttributes withoutSharedAttribute(Object key)

      Specified by:
        `withoutSharedAttribute` in class `ContextAttributes`

    - #### getAttribute

          public Object getAttribute(Object key)

      Description copied from class: `ContextAttributes`
      Accessor for value of specified attribute
      Specified by:
        `getAttribute` in class `ContextAttributes`

    - #### withPerCallAttribute

          public ContextAttributes withPerCallAttribute(Object key,
                                                        Object value)

      Description copied from class: `ContextAttributes`
      Mutator used during call (via context) to set value of "non-shared" part of attribute set.
      Specified by:
        `withPerCallAttribute` in class `ContextAttributes`

    - #### nonSharedInstance

          protected ContextAttributes nonSharedInstance(Object key,
                                                        Object value)

      Overridable method that creates initial non-shared instance, with the first explicit set value.

Copyright © 2008–2020 FasterXML. All rights reserved.