Class TypeBindings
java.lang.Object
com.fasterxml.jackson.databind.type.TypeBindings
- All Implemented Interfaces:
Serializable
Helper class used for resolving type parameters for given class
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionFactory method that will create an object that can be used as a key for caching purposes byTypeFactorystatic TypeBindingsstatic TypeBindingsstatic TypeBindingsstatic TypeBindingsFactory method for constructing bindings for given class using specified type parameters.static TypeBindingsFactory method for constructing bindings given names and associated types.static TypeBindingscreateIfNeeded(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 TypeBindingscreateIfNeeded(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 TypeBindingsbooleanfindBoundType(String name) Find type bound to specified name, if there is one; returns bound type if so, null if not.getBoundName(int index) getBoundType(int index) Accessor for getting bound types in declaration orderinthashCode()booleanhasUnbound(String name) booleanisEmpty()protected Objectintsize()Returns number of bindings containedtoString()protected JavaType[]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.
-
Method Details
-
emptyBindings
-
readResolve
-
create
Factory method for constructing bindings for given class using specified type parameters. -
create
-
create
-
create
-
create
Factory method for constructing bindings given names and associated types. -
createIfNeeded
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
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
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
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
-
getBoundType
-
getTypeParameters
Accessor for getting bound types in declaration order -
hasUnbound
- Since:
- 2.3
-
asKey
Factory method that will create an object that can be used as a key for caching purposes byTypeFactory- Returns:
- An object which can be used as a key in TypeFactory, or
nullif no key can be created. - Since:
- 2.8
-
toString
-
hashCode
public int hashCode() -
equals
-
typeParameterArray
-