code: protected void switchFactories(Gson newGson) {
          final Field factoriesField = DfReflectionUtil.getWholeField(newGson.getClass(), "factories");
          @SuppressWarnings("unchecked")
          final List<Object> factories = (List<Object>) DfReflectionUtil.getValueForcedly(factoriesField, newGson);
          final List<Object> filtered = new ArrayList<Object>();
          for (Object factory : factories) {
              if (factory instanceof ReflectiveTypeAdapterFactory) { // switched, only one time
                  filtered.add(createReflectiveTypeAdapterFactory(newGson, factory));
              } else {
                  filtered.add(factory);
              }
          }
          DfReflectionUtil.setValueForcedly(factoriesField, newGson, Collections.unmodifiableList(filtered));
      }
docs: ----------------