public class TypeResolver extends Object implements Serializable
Note that resolver instances are stateful in that resolvers cache resolved types for efficiency. Since this is internal state and not directly visible to callers, access to state is fully synchronized so that access from multiple threads is safe.
Modifier and Type | Field and Description |
---|---|
protected Map<ClassKey,ResolvedType> |
_cache |
protected static HashMap<ClassKey,ResolvedType> |
_primitives |
Constructor and Description |
---|
TypeResolver() |
Modifier and Type | Method and Description |
---|---|
ResolvedType |
resolve(TypeBindings typeBindings,
Type jdkType)
Factory method for resolving specified Java
Type , given
TypeBindings needed to resolve any type variables. |
protected static final HashMap<ClassKey,ResolvedType> _primitives
protected final Map<ClassKey,ResolvedType> _cache
public ResolvedType resolve(TypeBindings typeBindings, Type jdkType)
Type
, given
TypeBindings
needed to resolve any type variables.
Use of this method is discouraged (use if and only if you really know what you
are doing!); but if used, type bindings passed should come from ResolvedType
instance of declaring class (or interface).
NOTE: order of arguments was reversed for 0.8, to avoid problems with overload varargs method.
Copyright © 2014 FasterXML. All Rights Reserved.