com.fasterxml.jackson.databind.type

## Class TypeBindings

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

- All Implemented Interfaces:
    Serializable

      public class TypeBindings
      extends Object
      implements Serializable

  Helper class used for resolving type parameters for given class
  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `asKey(Class<?> rawBase)` Factory method that will create an object that can be used as a key for caching purposes by `TypeFactory`
    `static TypeBindings` | `create(Class<?> erasedType, JavaType typeArg1)`
    `static TypeBindings` | `create(Class<?> erasedType, JavaType[] types)`
    `static TypeBindings` | `create(Class<?> erasedType, JavaType typeArg1, JavaType typeArg2)`
    `static TypeBindings` | `create(Class<?> erasedType, List<JavaType> typeList)` Factory method for constructing bindings for given class using specified type parameters.
    `static TypeBindings` | `createIfNeeded(Class<?> erasedType, JavaType typeArg1)` Alternate factory method that may be called if it is possible that type does or does not require type parameters; this is mostly useful for collection- and map-like types.
    `static TypeBindings` | `createIfNeeded(Class<?> erasedType, JavaType[] types)` Alternate factory method that may be called if it is possible that type does or does not require type parameters; this is mostly useful for collection- and map-like types.
    `static TypeBindings` | `emptyBindings()`
    `boolean` | `equals(Object o)`
    `JavaType` | `findBoundType(String name)` Find type bound to specified name, if there is one; returns bound type if so, null if not.
    `String` | `getBoundName(int index)`
    `JavaType` | `getBoundType(int index)`
    `List<JavaType>` | `getTypeParameters()` Accessor for getting bound types in declaration order
    `int` | `hashCode()`
    `boolean` | `hasUnbound(String name)`
    `boolean` | `isEmpty()`
    `protected Object` | `readResolve()`
    `int` | `size()` Returns number of bindings contained
    `String` | `toString()`
    `protected JavaType[]` | `typeParameterArray()`
    `TypeBindings` | `withUnboundVariable(String name)` Method for creating an instance that has same bindings as this object, plus an indicator for additional type variable that may be unbound within this context; this is needed to resolve recursive self-references.

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### emptyBindings

          public static TypeBindings emptyBindings()

    - #### readResolve

          protected Object readResolve()

    - #### create

          public static TypeBindings create(Class<?> erasedType,
                                            List<JavaType> typeList)

      Factory method for constructing bindings for given class using specified type parameters.

    - #### create

          public static TypeBindings create(Class<?> erasedType,
                                            JavaType[] types)

    - #### create

          public static TypeBindings create(Class<?> erasedType,
                                            JavaType typeArg1)

    - #### create

          public static TypeBindings create(Class<?> erasedType,
                                            JavaType typeArg1,
                                            JavaType typeArg2)

    - #### createIfNeeded

          public static TypeBindings createIfNeeded(Class<?> erasedType,
                                                    JavaType typeArg1)

      Alternate factory method that may be called if it is possible that type does or does not require type parameters; this is mostly useful for collection- and map-like types.

    - #### createIfNeeded

          public static TypeBindings createIfNeeded(Class<?> erasedType,
                                                    JavaType[] types)

      Alternate factory method that may be called if it is possible that type does or does not require type parameters; this is mostly useful for collection- and map-like types.

    - #### withUnboundVariable

          public TypeBindings withUnboundVariable(String name)

      Method for creating an instance that has same bindings as this object, plus an indicator for additional type variable that may be unbound within this context; this is needed to resolve recursive self-references.

    - #### findBoundType

          public JavaType findBoundType(String name)

      Find type bound to specified name, if there is one; returns bound type if so, null if not.

    - #### isEmpty

          public boolean isEmpty()

    - #### size

          public int size()

      Returns number of bindings contained

    - #### getBoundName

          public String getBoundName(int index)

    - #### getBoundType

          public JavaType getBoundType(int index)

    - #### getTypeParameters

          public List<JavaType> getTypeParameters()

      Accessor for getting bound types in declaration order

    - #### hasUnbound

          public boolean hasUnbound(String name)

      Since:
        2.3

    - #### asKey

          public Object asKey(Class<?> rawBase)

      Factory method that will create an object that can be used as a key for caching purposes by `TypeFactory`
      Since:
        2.8

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### typeParameterArray

          protected JavaType[] typeParameterArray()

Copyright © 2008–2020 FasterXML. All rights reserved.