public GsonBuilder registerTypeAdapterFactory(TypeAdapterFactory factory){
  factories.add(factory);
  return this;
}

public GsonBuilder registerTypeAdapterFactory ( TypeAdapterFactory factory ) { factories . add ( factory ) ; return this ; }
register a factory for type adapters . registering a factory is useful when the type adapter needs to be configured based on the type of the field being processed . gson is designed to handle a large number of factories , so you should consider registering them to be at par with registering an individual type adapter .
