code: private static boolean isAssignable(final Type type, final TypeVariable<?> toTypeVariable,
                                          final Map<TypeVariable<?>, Type> typeVarAssigns) {
          if (type == null) {
              return true;
          }
  
          // only a null type can be assigned to null type which
          // would have cause the previous to return true
          if (toTypeVariable == null) {
              return false;
          }
  
          // all types are assignable to themselves
          if (toTypeVariable.equals(type)) {
              return true;
          }
  
          if (type instanceof TypeVariable<?>) {
              // a type variable is assignable to another type variable, if
              // and only if the former is the latter, extends the latter, or
              // is otherwise a descendant of the latter.
              final Type[] bounds = getImplicitBounds((TypeVariable<?>) type);
  
              for (final Type bound : bounds) {
                  if (isAssignable(bound, toTypeVariable, typeVarAssigns)) {
                      return true;
                  }
              }
          }
  
          if (type instanceof Class<?> || type instanceof ParameterizedType
                  || type instanceof GenericArrayType || type instanceof WildcardType) {
              return false;
          }
  
          throw new IllegalStateException("found an unhandled type: " + type);
      }
docs: <p>Checks if the subject type may be implicitly cast to the target type
  variable following the Java generics rules.</p>
  
  @param type           the subject type to be assigned to the target type
  @param toTypeVariable the target type variable
  @param typeVarAssigns a map with type variables
  @return {@code true} if {@code type} is assignable to
  {@code toTypeVariable}.