|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder
public class StdTypeResolverBuilder
Default TypeResolverBuilder implementation.
| Field Summary | |
|---|---|
protected TypeIdResolver |
_customIdResolver
|
protected Class<?> |
_defaultImpl
Default class to use in case type information is not available or is broken. |
protected com.fasterxml.jackson.annotation.JsonTypeInfo.Id |
_idType
|
protected com.fasterxml.jackson.annotation.JsonTypeInfo.As |
_includeAs
|
protected boolean |
_typeIdVisible
Whether type id should be exposed to deserializers or not |
protected String |
_typeProperty
|
| Constructor Summary | |
|---|---|
StdTypeResolverBuilder()
|
|
| Method Summary | |
|---|---|
TypeDeserializer |
buildTypeDeserializer(DeserializationConfig config,
JavaType baseType,
Collection<NamedType> subtypes)
Method for building type deserializer based on current configuration of this builder. |
TypeSerializer |
buildTypeSerializer(SerializationConfig config,
JavaType baseType,
Collection<NamedType> subtypes)
Method for building type serializer based on current configuration of this builder. |
StdTypeResolverBuilder |
defaultImpl(Class<?> defaultImpl)
Method for specifying default implementation to use if type id is either not available, or can not be resolved. |
Class<?> |
getDefaultImpl()
Accessor for currently configured default type; implementation class that may be used in case no valid type information is available during type resolution |
String |
getTypeProperty()
|
protected TypeIdResolver |
idResolver(MapperConfig<?> config,
JavaType baseType,
Collection<NamedType> subtypes,
boolean forSer,
boolean forDeser)
Helper method that will either return configured custom type id resolver, or construct a standard resolver given configuration. |
StdTypeResolverBuilder |
inclusion(com.fasterxml.jackson.annotation.JsonTypeInfo.As includeAs)
Method for specifying mechanism to use for including type metadata in JSON. |
StdTypeResolverBuilder |
init(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType,
TypeIdResolver idRes)
Initialization method that is called right after constructing the builder instance. |
boolean |
isTypeIdVisible()
|
static StdTypeResolverBuilder |
noTypeInfoBuilder()
|
StdTypeResolverBuilder |
typeIdVisibility(boolean isVisible)
Method for specifying whether type id should be visible to JsonDeserializers or not. |
StdTypeResolverBuilder |
typeProperty(String typeIdPropName)
Method for constructing an instance with specified type property name (property name to use for type id when using "as-property" inclusion). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected com.fasterxml.jackson.annotation.JsonTypeInfo.Id _idType
protected com.fasterxml.jackson.annotation.JsonTypeInfo.As _includeAs
protected String _typeProperty
protected boolean _typeIdVisible
protected Class<?> _defaultImpl
protected TypeIdResolver _customIdResolver
| Constructor Detail |
|---|
public StdTypeResolverBuilder()
| Method Detail |
|---|
public static StdTypeResolverBuilder noTypeInfoBuilder()
public StdTypeResolverBuilder init(com.fasterxml.jackson.annotation.JsonTypeInfo.Id idType,
TypeIdResolver idRes)
TypeResolverBuilder
init in interface TypeResolverBuilder<StdTypeResolverBuilder>idType - Which type metadata is usedidRes - (optional) Custom type id resolver used, if any
public TypeSerializer buildTypeSerializer(SerializationConfig config,
JavaType baseType,
Collection<NamedType> subtypes)
TypeResolverBuilder
buildTypeSerializer in interface TypeResolverBuilder<StdTypeResolverBuilder>baseType - Base type that constructed resolver will
handle; super type of all types it will be used for.
public TypeDeserializer buildTypeDeserializer(DeserializationConfig config,
JavaType baseType,
Collection<NamedType> subtypes)
TypeResolverBuilder
buildTypeDeserializer in interface TypeResolverBuilder<StdTypeResolverBuilder>baseType - Base type that constructed resolver will
handle; super type of all types it will be used for.subtypes - Known subtypes of the base type.public StdTypeResolverBuilder inclusion(com.fasterxml.jackson.annotation.JsonTypeInfo.As includeAs)
TypeResolverBuilderJsonTypeInfo.As.PROPERTY.
inclusion in interface TypeResolverBuilder<StdTypeResolverBuilder>includeAs - Mechanism used for including type metadata in JSON
public StdTypeResolverBuilder typeProperty(String typeIdPropName)
typeProperty in interface TypeResolverBuilder<StdTypeResolverBuilder>typeIdPropName - Name of JSON property to use for including
type information
public StdTypeResolverBuilder defaultImpl(Class<?> defaultImpl)
TypeResolverBuilder
defaultImpl in interface TypeResolverBuilder<StdTypeResolverBuilder>public StdTypeResolverBuilder typeIdVisibility(boolean isVisible)
TypeResolverBuilderJsonDeserializers or not.
typeIdVisibility in interface TypeResolverBuilder<StdTypeResolverBuilder>public String getTypeProperty()
public Class<?> getDefaultImpl()
TypeResolverBuilder
getDefaultImpl in interface TypeResolverBuilder<StdTypeResolverBuilder>public boolean isTypeIdVisible()
protected TypeIdResolver idResolver(MapperConfig<?> config,
JavaType baseType,
Collection<NamedType> subtypes,
boolean forSer,
boolean forDeser)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||