/**
 * OpenAPI Petstore
 * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package org.openapitools.client.api;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

import io.helidon.common.GenericType;

class ResponseType<T> {

  static <T> GenericType<T> create(Type rawType, Type... typeParams) {
    return typeParams.length == 0
      ? GenericType.create(rawType)
      : GenericType.create(new ParameterizedType() {

        @Override
        public Type[] getActualTypeArguments() {
          return typeParams;
        }

        @Override
        public Type getRawType() {
          return rawType;
        }

        @Override
        public Type getOwnerType() {
          return null;
        }
      });
  }
}