title: Replacing abstract factory with Guice?
body: <p>I am new to Guice and I was wondering how far I can take it.
  I have an interface <code>UserInfo</code> with multiple implementing classes <code>GoogleUserInfo</code>, <code>FacebookUserInfo</code>, <code>TwitterUserInfo</code> etc. These classes are created using a factory</p>
  
  <pre><code>public class UserInfoFactory {
    public UserInfo createFromJsonString(String jsonspec) {
      .
      .
      .
  
    }
  }
  </code></pre>
  
  <p>The creation is controlled by the JSON string <code>jsonspec</code> which controls which of the implementing classes of <code>UserInfo</code> is returned. Specifically, there is a JSON string element <code>domain</code> which controls the creation. The creation really is a function of the deserialization of <code>jsonspec</code> using GSON.<br>
  I was wondering if there is a good way to replace this creation with a Guice dependency injection?</p>