Class GenericTypeIdResolver<T>
- java.lang.Object
-
- com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
-
- com.stackone.stackone_client_java.utils.GenericTypeIdResolver<T>
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsontype.TypeIdResolver
public abstract class GenericTypeIdResolver<T> extends com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBaseGeneric type resolver that supports both manual type registration and automatic fallback to unknown types for unrecognized discriminator values.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<? extends T>unknownType
-
Constructor Summary
Constructors Modifier Constructor Description protectedGenericTypeIdResolver(java.lang.Class<? extends T> unknownType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.annotation.JsonTypeInfo.IdgetMechanism()java.lang.StringidFromValueAndType(java.lang.Object value, java.lang.Class<?> suggestedType)protected voidregisterType(java.lang.String typeId, java.lang.Class<? extends T> clazz)com.fasterxml.jackson.databind.JavaTypetypeFromId(com.fasterxml.jackson.databind.DatabindContext context, java.lang.String id)-
Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase
_resolveToParentAsNecessary, getDescForKnownTypeIds, idFromBaseType, init
-
-
-
-
Field Detail
-
unknownType
protected final java.lang.Class<? extends T> unknownType
-
-
Constructor Detail
-
GenericTypeIdResolver
protected GenericTypeIdResolver(java.lang.Class<? extends T> unknownType)
-
-
Method Detail
-
registerType
protected void registerType(java.lang.String typeId, java.lang.Class<? extends T> clazz)
-
idFromValueAndType
public java.lang.String idFromValueAndType(java.lang.Object value, java.lang.Class<?> suggestedType)
-
getMechanism
public com.fasterxml.jackson.annotation.JsonTypeInfo.Id getMechanism()
-
typeFromId
public com.fasterxml.jackson.databind.JavaType typeFromId(com.fasterxml.jackson.databind.DatabindContext context, java.lang.String id) throws java.io.IOException- Specified by:
typeFromIdin interfacecom.fasterxml.jackson.databind.jsontype.TypeIdResolver- Overrides:
typeFromIdin classcom.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase- Throws:
java.io.IOException
-
-