com.fasterxml.jackson.jaxrs.cfg

## Class ObjectWriterInjector

- java.lang.Object
- - com.fasterxml.jackson.jaxrs.cfg.ObjectWriterInjector

-     public class ObjectWriterInjector
      extends Object

  Based on ideas from [Issue#32], this class allows "overriding" of `ObjectWriter` that JAX-RS Resource will use; usually this is done from a Servlet or JAX-RS filter before execution reaches resource.
  Since:
    2.3

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static AtomicBoolean` | `_hasBeenSet` Simple marker used to optimize out `ThreadLocal` access in cases where this feature is not being used
    `protected static ThreadLocal<ObjectWriterModifier>` | `_threadLocal`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ObjectWriterModifier` | `get()`
    `static ObjectWriterModifier` | `getAndClear()`
    `static void` | `set(ObjectWriterModifier mod)`

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

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

- - ### Field Detail

    - #### _threadLocal

          protected static final ThreadLocal<ObjectWriterModifier> _threadLocal

    - #### _hasBeenSet

          protected static final AtomicBoolean _hasBeenSet

      Simple marker used to optimize out `ThreadLocal` access in cases where this feature is not being used

  - ### Method Detail

    - #### set

          public static void set(ObjectWriterModifier mod)

    - #### get

          public static ObjectWriterModifier get()

    - #### getAndClear

          public static ObjectWriterModifier getAndClear()

Copyright © 2016 FasterXML. All rights reserved.