com.fasterxml.jackson.databind.ser.impl

## Class WritableObjectId

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

    public final class WritableObjectId
    extends Object

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

### Field Summary

Fields
`com.fasterxml.jackson.annotation.ObjectIdGenerator<?>` `generator`
`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

All Methods Instance Methods Concrete Methods
`Object` `generateId(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 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 IOException

Throws:
  `IOException`

#### generateId

    public Object generateId(Object forPojo)

#### writeAsField

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

Method called to output Object Id as specified.

Throws:
  `IOException`