com.fasterxml.jackson.databind.type

## Class TypeModifier

- java.lang.Object
- - com.fasterxml.jackson.databind.type.TypeModifier

-     public abstract class TypeModifier
      extends Object

  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 can not be constructed in generic fashion.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TypeModifier()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract JavaType` | `modifyType(JavaType type, Type jdkType, TypeBindings context, TypeFactory typeFactory)` Method called to let modifier change constructed type definition.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TypeModifier

          public TypeModifier()

  - ### Method Detail

    - #### modifyType

          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` - Instance to modify
        `jdkType` - JDK type that was used to construct instance to modify
        `context` - Type resolution context used for the type
        `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:
        Actual type instance to use; usually either `type` (as is or with modifications), or a newly constructed type instance based on it. Can not be null.

Copyright © 2014 FasterXML. All Rights Reserved.