private TypeAdapter<?> getFieldAdapter(Gson gson, Field field, TypeToken<?> fieldType) {
    TypeAdapter<?> adapter = gson.getAdapter(fieldType);
    boolean generatedAdapter = Gson.$$Internal.isGeneratedTypeAdapter(gson, adapter);
    if (generatedAdapter && field.isAnnotationPresent(JsonAdapter.class)) {
      JsonAdapter annotation = field.getAnnotation(JsonAdapter.class);
      return JsonAdapterAnnotationTypeAdapterFactory.getAnnotationTypeAdapter(
          gson, constructorConstructor, annotation);
    }
    return adapter;
  }