Top Description Constructors Methods
com.fasterxml.jackson.databind.type

public abstract Class TypeModifier

extends Object
Class Inheritance
Imports
java.lang.reflect.Type, com.fasterxml.jackson.databind.JavaType

Class that defines API that can be used to modify details of JavaType instances constructed using TypeFactory. Registered modifiers are called in order, to let them modify (or replace) basic type instance factory constructs. This is typically needed to support creation of MapLikeType and CollectionLikeType instances, as those cannot be constructed in generic fashion.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract JavaType

Returns:

Actual type instance to use; usually either type (as is or with modifications), or a newly constructed type instance based on it. Cannot be null.
modifyType
(JavaType
Instance to modify
type
,
Type
JDK type that was used to construct instance to modify
jdkType
,
TypeBindings
Type resolution context used for the type
context
,
TypeFactory
Type factory that can be used to construct parameter type; note, however, that care must be taken to avoid infinite loops -- specifically, do not construct instance of primary type itself
typeFactory
)

Method called to let modifier change constructed type definition.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TypeModifierback to summary
public TypeModifier()

Method Detail

modifyTypeback to summary
public abstract JavaType modifyType(JavaType type, Type jdkType, TypeBindings context, TypeFactory typeFactory)

Method called to let modifier change constructed type definition. Note that this is only guaranteed to be called for non-container types ("simple" types not recognized as arrays, java.util.Collection or java.util.Map).

Parameters
type:JavaType

Instance to modify

jdkType:Type

JDK type that was used to construct instance to modify

context:TypeBindings

Type resolution context used for the type

typeFactory:TypeFactory

Type factory that can be used to construct parameter type; note, however, that care must be taken to avoid infinite loops -- specifically, do not construct instance of primary type itself

Returns:JavaType

Actual type instance to use; usually either type (as is or with modifications), or a newly constructed type instance based on it. Cannot be null.