TypeBindings (Jackson JSON Processor)
Date: 2013-07-14

org.codehaus.jackson.map.type

## Class TypeBindings

- java.lang.Object
- - org.codehaus.jackson.map.type.TypeBindings

-     public class TypeBindings
      extends Object

  Helper class used for resolving type parameters for given class
  Since:
    1.5

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<String,JavaType>` | `_bindings` Lazily-instantiated bindings of resolved type parameters
    `protected Class<?>` | `_contextClass` Specific class to use for resolving all types, for methods and fields class and its superclasses and -interfaces contain.
    `protected JavaType` | `_contextType` Context type used for resolving all types, if specified.
    `protected HashSet<String>` | `_placeholders` Also: we may temporarily want to mark certain named types as resolved (but without exact type); if so, we'll just store names here.
    `protected TypeFactory` | `_typeFactory` Factory to use for constructing resolved related types.
    `static JavaType` | `UNBOUND` Marker to use for (temporarily) unbound references.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TypeBindings(TypeFactory typeFactory, Class<?> cc)`
    `TypeBindings(TypeFactory typeFactory, JavaType type)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `_addPlaceholder(String name)`
    `protected void` | `_resolve()`
    `protected void` | `_resolveBindings(Type t)`
    `void` | `addBinding(String name, JavaType type)`
    `TypeBindings` | `childInstance()` Constructor used to create "child" instances; mostly to allow delegation from explicitly defined local overrides (local type variables for methods, constructors) to contextual (class-defined) ones.
    `JavaType` | `findType(String name)`
    `int` | `getBindingCount()`
    `JavaType` | `resolveType(Class<?> cls)`
    `JavaType` | `resolveType(Type type)`
    `String` | `toString()`
    `JavaType[]` | `typesAsArray()`

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

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

- - ### Field Detail

    - #### UNBOUND

          public static final JavaType UNBOUND

      Marker to use for (temporarily) unbound references.

    - #### _typeFactory

          protected final TypeFactory _typeFactory

      Factory to use for constructing resolved related types.

    - #### _contextType

          protected final JavaType _contextType

      Context type used for resolving all types, if specified. May be null, in which case `_contextClass` is used instead.

    - #### _contextClass

          protected final Class<?> _contextClass

      Specific class to use for resolving all types, for methods and fields class and its superclasses and -interfaces contain.

    - #### _bindings

          protected Map<String,JavaType> _bindings

      Lazily-instantiated bindings of resolved type parameters

    - #### _placeholders

          protected HashSet<String> _placeholders

      Also: we may temporarily want to mark certain named types as resolved (but without exact type); if so, we'll just store names here.

  - ### Constructor Detail

    - #### TypeBindings

          public TypeBindings(TypeFactory typeFactory,
                      Class<?> cc)

    - #### TypeBindings

          public TypeBindings(TypeFactory typeFactory,
                      JavaType type)

  - ### Method Detail

    - #### childInstance

          public TypeBindings childInstance()

      Constructor used to create "child" instances; mostly to allow delegation from explicitly defined local overrides (local type variables for methods, constructors) to contextual (class-defined) ones.
      Since:
        1.7

    - #### resolveType

          public JavaType resolveType(Class<?> cls)

    - #### resolveType

          public JavaType resolveType(Type type)

    - #### getBindingCount

          public int getBindingCount()

      Since:
        1.8

    - #### findType

          public JavaType findType(String name)

    - #### addBinding

          public void addBinding(String name,
                        JavaType type)

    - #### typesAsArray

          public JavaType[] typesAsArray()

    - #### _resolve

          protected void _resolve()

    - #### _addPlaceholder

          public void _addPlaceholder(String name)

    - #### _resolveBindings

          protected void _resolveBindings(Type t)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`