com.fasterxml.jackson.databind

## Class ObjectWriter.Prefetch

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

- All Implemented Interfaces:
    Serializable
  Enclosing class:
    ObjectWriter

      public static final class ObjectWriter.Prefetch
      extends Object
      implements 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<Object>` | `getValueSerializer()`
    `boolean` | `hasSerializer()`
    `void` | `serialize(JsonGenerator gen, 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<Object> getValueSerializer()

    - #### getTypeSerializer

          public final TypeSerializer getTypeSerializer()

    - #### hasSerializer

          public boolean hasSerializer()

    - #### serialize

          public void serialize(JsonGenerator gen,
                       Object value,
                       DefaultSerializerProvider prov)
                         throws IOException

      Throws:
        `IOException`

Copyright © 2008–2016 FasterXML. All rights reserved.