Class ContextAttributes.Impl
- java.lang.Object
-
- com.fasterxml.jackson.databind.cfg.ContextAttributes
-
- com.fasterxml.jackson.databind.cfg.ContextAttributes.Impl
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- ContextAttributes
public static class ContextAttributes.Impl extends ContextAttributes implements java.io.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 Description protected java.util.Map<java.lang.Object,java.lang.Object>
_nonShared
Per-call attributes that we can directly modify, since they are not shared between threads.protected java.util.Map<?,?>
_shared
Shared attributes that we cannot modify in-place.protected static ContextAttributes.Impl
EMPTY
protected static java.lang.Object
NULL_SURROGATE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getAttribute(java.lang.Object key)
Accessor for value of specified attributestatic ContextAttributes
getEmpty()
protected ContextAttributes
nonSharedInstance(java.lang.Object key, java.lang.Object value)
Overridable method that creates initial non-shared instance, with the first explicit set value.ContextAttributes
withoutSharedAttribute(java.lang.Object key)
ContextAttributes
withPerCallAttribute(java.lang.Object key, java.lang.Object value)
Mutator used during call (via context) to set value of "non-shared" part of attribute set.ContextAttributes
withSharedAttribute(java.lang.Object key, java.lang.Object value)
ContextAttributes
withSharedAttributes(java.util.Map<?,?> shared)
-
-
-
Field Detail
-
EMPTY
protected static final ContextAttributes.Impl EMPTY
-
NULL_SURROGATE
protected static final java.lang.Object NULL_SURROGATE
-
_shared
protected final java.util.Map<?,?> _shared
Shared attributes that we cannot modify in-place.
-
_nonShared
protected transient java.util.Map<java.lang.Object,java.lang.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.
-
-
Method Detail
-
getEmpty
public static ContextAttributes getEmpty()
-
withSharedAttribute
public ContextAttributes withSharedAttribute(java.lang.Object key, java.lang.Object value)
- Specified by:
withSharedAttribute
in classContextAttributes
-
withSharedAttributes
public ContextAttributes withSharedAttributes(java.util.Map<?,?> shared)
- Specified by:
withSharedAttributes
in classContextAttributes
-
withoutSharedAttribute
public ContextAttributes withoutSharedAttribute(java.lang.Object key)
- Specified by:
withoutSharedAttribute
in classContextAttributes
-
getAttribute
public java.lang.Object getAttribute(java.lang.Object key)
Description copied from class:ContextAttributes
Accessor for value of specified attribute- Specified by:
getAttribute
in classContextAttributes
-
withPerCallAttribute
public ContextAttributes withPerCallAttribute(java.lang.Object key, java.lang.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 classContextAttributes
-
nonSharedInstance
protected ContextAttributes nonSharedInstance(java.lang.Object key, java.lang.Object value)
Overridable method that creates initial non-shared instance, with the first explicit set value.
-
-