Package org.codehaus.jackson.map.type
Class TypeBindings
- java.lang.Object
-
- org.codehaus.jackson.map.type.TypeBindings
-
public class TypeBindings extends java.lang.ObjectHelper class used for resolving type parameters for given class- Since:
- 1.5
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,JavaType>_bindingsLazily-instantiated bindings of resolved type parametersprotected java.lang.Class<?>_contextClassSpecific class to use for resolving all types, for methods and fields class and its superclasses and -interfaces contain.protected JavaType_contextTypeContext type used for resolving all types, if specified.protected java.util.HashSet<java.lang.String>_placeholdersAlso: 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_typeFactoryFactory to use for constructing resolved related types.static JavaTypeUNBOUNDMarker to use for (temporarily) unbound references.
-
Constructor Summary
Constructors Constructor Description TypeBindings(TypeFactory typeFactory, java.lang.Class<?> cc)TypeBindings(TypeFactory typeFactory, JavaType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void_addPlaceholder(java.lang.String name)protected void_resolve()protected void_resolveBindings(java.lang.reflect.Type t)voidaddBinding(java.lang.String name, JavaType type)TypeBindingschildInstance()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.JavaTypefindType(java.lang.String name)intgetBindingCount()JavaTyperesolveType(java.lang.Class<?> cls)JavaTyperesolveType(java.lang.reflect.Type type)java.lang.StringtoString()JavaType[]typesAsArray()
-
-
-
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_contextClassis used instead.
-
_contextClass
protected final java.lang.Class<?> _contextClass
Specific class to use for resolving all types, for methods and fields class and its superclasses and -interfaces contain.
-
_bindings
protected java.util.Map<java.lang.String,JavaType> _bindings
Lazily-instantiated bindings of resolved type parameters
-
_placeholders
protected java.util.HashSet<java.lang.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, java.lang.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(java.lang.Class<?> cls)
-
resolveType
public JavaType resolveType(java.lang.reflect.Type type)
-
getBindingCount
public int getBindingCount()
- Since:
- 1.8
-
findType
public JavaType findType(java.lang.String name)
-
addBinding
public void addBinding(java.lang.String name, JavaType type)
-
typesAsArray
public JavaType[] typesAsArray()
-
_resolve
protected void _resolve()
-
_addPlaceholder
public void _addPlaceholder(java.lang.String name)
-
_resolveBindings
protected void _resolveBindings(java.lang.reflect.Type t)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-