public static ParameterizedType parameterize(Class<?> rawClass, Type... typeArguments) {
    return new ParameterizedTypeImpl(rawClass.getEnclosingClass(), rawClass, typeArguments);
  }
Resolves the last type parameter of the parameterized {@code supertype}, based on the {@code
genericContext}, into its upper bounds.

<p>Implementation copied from {@code retrofit.RestMethodInfo}.

@param genericContext Ex. {@link java.lang.reflect.Field#getGenericType()}
@param supertype Ex. {@code Decoder.class}
@return in the example above, the type parameter of {@code Decoder}.
@throws IllegalStateException if {@code supertype} cannot be resolved into a parameterized type
    using {@code context}.
core/src/main/java/feign/Types.java