Class MethodGenericTypeResolver
java.lang.Object
tools.jackson.databind.introspect.MethodGenericTypeResolver
Internal utility functionality to handle type resolution for method type variables
based on the requested result type: this is needed to work around the problem of
static factory methods not being able to use class type variable bindings
(see [databind#2895] for more).
- Since:
- 2.12
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static TypeBindingsbindMethodTypeParameters(Method candidate, JavaType requestedType, TypeResolutionContext emptyTypeResCtxt) ReturnsTypeBindingswith additional type information based onrequestedTypeif possible, otherwisenull.private static TypeVariable<?> findByName(TypeVariable<?>[] typeVariables, String name) private static ParameterizedTypeprivate static TypeVariable<?> maybeGetTypeVariable(Type type) static TypeResolutionContextnarrowMethodTypeParameters(Method candidate, JavaType requestedType, TypeFactory typeFactory, TypeResolutionContext emptyTypeResCtxt) private static booleanpessimisticallyValidateBound(TypeResolutionContext context, JavaType boundType, Type type) private static booleanpessimisticallyValidateBounds(TypeResolutionContext context, JavaType boundType, Type[] upperBound)
-
Constructor Details
-
MethodGenericTypeResolver
MethodGenericTypeResolver()
-
-
Method Details
-
narrowMethodTypeParameters
public static TypeResolutionContext narrowMethodTypeParameters(Method candidate, JavaType requestedType, TypeFactory typeFactory, TypeResolutionContext emptyTypeResCtxt) -
bindMethodTypeParameters
static TypeBindings bindMethodTypeParameters(Method candidate, JavaType requestedType, TypeResolutionContext emptyTypeResCtxt) ReturnsTypeBindingswith additional type information based onrequestedTypeif possible, otherwisenull. -
maybeGetTypeVariable
-
maybeGetParameterizedType
-
pessimisticallyValidateBounds
private static boolean pessimisticallyValidateBounds(TypeResolutionContext context, JavaType boundType, Type[] upperBound) -
pessimisticallyValidateBound
private static boolean pessimisticallyValidateBound(TypeResolutionContext context, JavaType boundType, Type type) -
findByName
-