WritableObjectId
Date: 2016-12-04

com.fasterxml.jackson.databind.ser.impl

## Class WritableObjectId

- java.lang.Object
- - com.fasterxml.jackson.databind.ser.impl.WritableObjectId

-     public final class WritableObjectId
      extends java.lang.Object

  Simple value container used to keep track of Object Ids during serialization.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `com.fasterxml.jackson.annotation.ObjectIdGenerator<?>` | `generator`
    `java.lang.Object` | `id`
    `protected boolean` | `idWritten` Marker to denote whether Object Id value has been written as part of an Object, to be referencible.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WritableObjectId(com.fasterxml.jackson.annotation.ObjectIdGenerator<?> generator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `generateId(java.lang.Object forPojo)`
    `void` | `writeAsField(com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, ObjectIdWriter w)` Method called to output Object Id as specified.
    `boolean` | `writeAsId(com.fasterxml.jackson.core.JsonGenerator gen, SerializerProvider provider, ObjectIdWriter w)`

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

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

- - ### Field Detail

    - #### generator

          public final com.fasterxml.jackson.annotation.ObjectIdGenerator<?> generator

    - #### id

          public java.lang.Object id

    - #### idWritten

          protected boolean idWritten

      Marker to denote whether Object Id value has been written as part of an Object, to be referencible. Remains false when forward-reference is written.

  - ### Constructor Detail

    - #### WritableObjectId

          public WritableObjectId(com.fasterxml.jackson.annotation.ObjectIdGenerator<?> generator)

  - ### Method Detail

    - #### writeAsId

          public boolean writeAsId(com.fasterxml.jackson.core.JsonGenerator gen,
                          SerializerProvider provider,
                          ObjectIdWriter w)
                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### generateId

          public java.lang.Object generateId(java.lang.Object forPojo)

    - #### writeAsField

          public void writeAsField(com.fasterxml.jackson.core.JsonGenerator gen,
                          SerializerProvider provider,
                          ObjectIdWriter w)
                            throws java.io.IOException

      Method called to output Object Id as specified.
      Throws:
        `java.io.IOException`