Commit to factories as the mechanism to lookup type adapters. This uses factories for type hierarchy adapters. We keep a separate list of factories for tree-style adapters registered with registerTypeHierarchyAdapter to guarantee that these come after the non-hierarchy adapters.

This drops support for type hierarchy instance creators. I don't expect this to be a problem. We'll also detect fewer errors where multiple type adapters can serialize the same type. With APIs like getNextTypeAdapter, I think this might actually be an improvement!
11 files changed
tree: a65ed9646f7ea80971dbe77e123a1c186ca71923
  1. examples/
  2. extras/
  3. gson/
  4. lib/
  5. metrics/
  6. proto/