* is resolved.
*/
TypeToken<ApiContext<? extends Closeable>> contextToken = new TypeToken<ApiContext<? extends Closeable>>() {
private static final long serialVersionUID = 1L;
};
Closeable api = unwrap(contextToken).getApi();
checkArgument(apiClass.isAssignableFrom(api.getClass()),
"API type: %s not assignable to %s", api.getClass(), apiClass);
return apiClass.cast(api);
}