public static final class ObjectWriter.Prefetch extends Object implements Serializable
TypeSerializer
, if given enough
information.Modifier and Type | Field and Description |
---|---|
static ObjectWriter.Prefetch |
empty |
JavaType |
rootType
Specified root serialization type to use; can be same
as runtime type, but usually one of its super types
|
TypeSerializer |
typeSerializer
When dealing with polymorphic types, we can not pre-fetch
serializer, but we can pre-fetch
TypeSerializer . |
JsonSerializer<Object> |
valueSerializer
We may pre-fetch serializer if
rootType
is known, and if so, reuse it afterwards. |
Modifier and Type | Method and Description |
---|---|
static ObjectWriter.Prefetch |
construct(JavaType type,
JsonSerializer<Object> ser) |
static ObjectWriter.Prefetch |
construct(JavaType type,
TypeSerializer typeSer) |
boolean |
hasSerializer() |
public static final ObjectWriter.Prefetch empty
public final JavaType rootType
public final JsonSerializer<Object> valueSerializer
rootType
is known, and if so, reuse it afterwards.
This allows avoiding further serializer lookups and increases
performance a bit on cases where readers are reused.public final TypeSerializer typeSerializer
TypeSerializer
.public static ObjectWriter.Prefetch construct(JavaType type, JsonSerializer<Object> ser)
public static ObjectWriter.Prefetch construct(JavaType type, TypeSerializer typeSer)
public boolean hasSerializer()
Copyright © 2014-2015 FasterXML. All Rights Reserved.