Class MethodGenericTypeResolver
- java.lang.Object
-
- com.fasterxml.jackson.databind.introspect.MethodGenericTypeResolver
-
final class MethodGenericTypeResolver extends java.lang.ObjectInternal 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 Constructor Description MethodGenericTypeResolver()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static TypeBindingsbindMethodTypeParameters(java.lang.reflect.Method candidate, JavaType requestedType, TypeResolutionContext emptyTypeResCtxt)ReturnsTypeBindingswith additional type information based onrequestedTypeif possible, otherwisenull.private static java.lang.reflect.TypeVariable<?>findByName(java.lang.reflect.TypeVariable<?>[] typeVariables, java.lang.String name)private static java.lang.reflect.ParameterizedTypemaybeGetParameterizedType(java.lang.reflect.Type type)private static java.lang.reflect.TypeVariable<?>maybeGetTypeVariable(java.lang.reflect.Type type)static TypeResolutionContextnarrowMethodTypeParameters(java.lang.reflect.Method candidate, JavaType requestedType, TypeFactory typeFactory, TypeResolutionContext emptyTypeResCtxt)private static booleanpessimisticallyValidateBound(TypeResolutionContext context, JavaType boundType, java.lang.reflect.Type type)private static booleanpessimisticallyValidateBounds(TypeResolutionContext context, JavaType boundType, java.lang.reflect.Type[] upperBound)
-
-
-
Method Detail
-
narrowMethodTypeParameters
public static TypeResolutionContext narrowMethodTypeParameters(java.lang.reflect.Method candidate, JavaType requestedType, TypeFactory typeFactory, TypeResolutionContext emptyTypeResCtxt)
-
bindMethodTypeParameters
static TypeBindings bindMethodTypeParameters(java.lang.reflect.Method candidate, JavaType requestedType, TypeResolutionContext emptyTypeResCtxt)
ReturnsTypeBindingswith additional type information based onrequestedTypeif possible, otherwisenull.
-
maybeGetTypeVariable
private static java.lang.reflect.TypeVariable<?> maybeGetTypeVariable(java.lang.reflect.Type type)
-
maybeGetParameterizedType
private static java.lang.reflect.ParameterizedType maybeGetParameterizedType(java.lang.reflect.Type type)
-
pessimisticallyValidateBounds
private static boolean pessimisticallyValidateBounds(TypeResolutionContext context, JavaType boundType, java.lang.reflect.Type[] upperBound)
-
pessimisticallyValidateBound
private static boolean pessimisticallyValidateBound(TypeResolutionContext context, JavaType boundType, java.lang.reflect.Type type)
-
findByName
private static java.lang.reflect.TypeVariable<?> findByName(java.lang.reflect.TypeVariable<?>[] typeVariables, java.lang.String name)
-
-