public TypeToken<T> getType() {
    return type;
  }
Creates adapter from {@link Gson} and type tokens.
@param <T> the generic type
@param gson Gson instance
@param type supertype token
@param subtypes subtype tokens
@return subtype adapter
gson/src/org/immutables/gson/adapter/ExpectedSubtypesAdapter.java