Class MethodGenericTypeResolver


  • final class MethodGenericTypeResolver
    extends java.lang.Object
    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 Detail

      • MethodGenericTypeResolver

        MethodGenericTypeResolver()
    • Method Detail

      • bindMethodTypeParameters

        static TypeBindings bindMethodTypeParameters​(java.lang.reflect.Method candidate,
                                                     JavaType requestedType,
                                                     TypeResolutionContext emptyTypeResCtxt)
        Returns TypeBindings with additional type information based on requestedType if possible, otherwise null.
      • 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)