com.fasterxml.jackson.databind

## Class ObjectWriter.Prefetch

- java.lang.Object
- - com.fasterxml.jackson.databind.ObjectWriter.Prefetch

- All Implemented Interfaces:
    java.io.Serializable
  Enclosing class:
    ObjectWriter

      public static final class ObjectWriter.Prefetch
      extends java.lang.Object
      implements java.io.Serializable

  As a minor optimization, we will make an effort to pre-fetch a serializer, or at least relevant `TypeSerializer`, if given enough information.
  Since:
    2.5
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ObjectWriter.Prefetch` | `empty`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ObjectWriter.Prefetch` | `forRootType(ObjectWriter parent, JavaType newType)`
    `TypeSerializer` | `getTypeSerializer()`
    `JsonSerializer<java.lang.Object>` | `getValueSerializer()`
    `boolean` | `hasSerializer()`
    `void` | `serialize(com.fasterxml.jackson.core.JsonGenerator gen, java.lang.Object value, DefaultSerializerProvider prov)`

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

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

- - ### Field Detail

    - #### empty

          public static final ObjectWriter.Prefetch empty

  - ### Method Detail

    - #### forRootType

          public ObjectWriter.Prefetch forRootType(ObjectWriter parent,
                                          JavaType newType)

    - #### getValueSerializer

          public final JsonSerializer<java.lang.Object> getValueSerializer()

    - #### getTypeSerializer

          public final TypeSerializer getTypeSerializer()

    - #### hasSerializer

          public boolean hasSerializer()

    - #### serialize

          public void serialize(com.fasterxml.jackson.core.JsonGenerator gen,
                       java.lang.Object value,
                       DefaultSerializerProvider prov)
                         throws java.io.IOException

      Throws:
        `java.io.IOException`