code: public <S extends Service> AbstractModule factory(final Factory<S> factory) {
          String name = factory.getServiceClass().getName();
          return factory(name, factory);
      }
docs: Registers a service object factory instance with the module, so that the
  service object is created by the factory if/when the service is
  requested. The method is useful if the service creation needs
  customization/configuration, e.g. the creation of the service depends on
  other resources. If you merely wish to create an object via
  <code>new</code> or <code>GWT.create()</code>, then there is a
  convenience method {@link AbstractModule#service(Class) } so you do not
  have to define or instantiate a custom factory.
  
  @param factory An instance of Factory object that creates a Service object.