public abstract class TypeSerializerBase extends TypeSerializer
| Modifier and Type | Field and Description |
|---|---|
protected TypeIdResolver |
_idResolver |
protected BeanProperty |
_property |
| Modifier | Constructor and Description |
|---|---|
protected |
TypeSerializerBase(TypeIdResolver idRes,
BeanProperty property) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_generateTypeId(com.fasterxml.jackson.core.type.WritableTypeId idMetadata)
Helper method that will generate type id to use, if not already passed.
|
String |
getPropertyName()
Name of property that contains type information, if
property-based inclusion is used.
|
TypeIdResolver |
getTypeIdResolver()
Accessor for object that handles conversions between
types and matching type ids.
|
abstract com.fasterxml.jackson.annotation.JsonTypeInfo.As |
getTypeInclusion()
Accessor for type information inclusion method
that serializer uses; indicates how type information
is embedded in resulting JSON.
|
protected void |
handleMissingId(Object value) |
protected String |
idFromValue(Object value) |
protected String |
idFromValueAndType(Object value,
Class<?> type) |
com.fasterxml.jackson.core.type.WritableTypeId |
writeTypePrefix(com.fasterxml.jackson.core.JsonGenerator g,
com.fasterxml.jackson.core.type.WritableTypeId idMetadata)
Method called to write initial part of type information for given
value, along with possible wrapping to use: details are specified
by `typeId` argument.
|
com.fasterxml.jackson.core.type.WritableTypeId |
writeTypeSuffix(com.fasterxml.jackson.core.JsonGenerator g,
com.fasterxml.jackson.core.type.WritableTypeId idMetadata) |
_writeLegacySuffix, forProperty, typeId, typeId, typeId, writeCustomTypePrefixForArray, writeCustomTypePrefixForObject, writeCustomTypePrefixForScalar, writeCustomTypeSuffixForArray, writeCustomTypeSuffixForObject, writeCustomTypeSuffixForScalar, writeTypePrefixForArray, writeTypePrefixForArray, writeTypePrefixForObject, writeTypePrefixForObject, writeTypePrefixForScalar, writeTypePrefixForScalar, writeTypeSuffixForArray, writeTypeSuffixForObject, writeTypeSuffixForScalarprotected final TypeIdResolver _idResolver
protected final BeanProperty _property
protected TypeSerializerBase(TypeIdResolver idRes, BeanProperty property)
public abstract com.fasterxml.jackson.annotation.JsonTypeInfo.As getTypeInclusion()
TypeSerializergetTypeInclusion in class TypeSerializerpublic String getPropertyName()
TypeSerializergetPropertyName in class TypeSerializerpublic TypeIdResolver getTypeIdResolver()
TypeSerializergetTypeIdResolver in class TypeSerializerpublic com.fasterxml.jackson.core.type.WritableTypeId writeTypePrefix(com.fasterxml.jackson.core.JsonGenerator g,
com.fasterxml.jackson.core.type.WritableTypeId idMetadata)
throws IOException
TypeSerializerwriteTypePrefix in class TypeSerializerg - Generator to use for outputting type id and possible wrappingidMetadata - Details of what type id is to be written, how.IOExceptionpublic com.fasterxml.jackson.core.type.WritableTypeId writeTypeSuffix(com.fasterxml.jackson.core.JsonGenerator g,
com.fasterxml.jackson.core.type.WritableTypeId idMetadata)
throws IOException
writeTypeSuffix in class TypeSerializerIOExceptionprotected void _generateTypeId(com.fasterxml.jackson.core.type.WritableTypeId idMetadata)
protected void handleMissingId(Object value)
Copyright © 2018. All rights reserved.