private ImmutableMap<Equivalence.Wrapper<TypeMirror>, Serializer> buildSerializersMap() {
      SerializerFactory factory =
          SerializerFactoryLoader.getFactory(context.processingEnvironment());
      return propertyMirrors.stream()
          .map(PropertyMirror::getType)
          .map(MoreTypes.equivalence()::wrap)
          .distinct()
          .collect(
              toImmutableMap(
                  Function.identity(), equivalence -> factory.getSerializer(equivalence.get())));
    }
Creates an implementation of writeReplace that delegates serialization to its inner Proxy
class.
value/src/main/java/com/google/auto/value/extension/serializable/processor/SerializableAutoValueExtension.java