Replacing abstract factory with Guice?
问题 I am new to Guice and I was wondering how far I can take it. I have an interface UserInfo with multiple implementing classes GoogleUserInfo , FacebookUserInfo , TwitterUserInfo etc. These classes are created using a factory public class UserInfoFactory { public UserInfo createFromJsonString(String jsonspec) { . . . } } The creation is controlled by the JSON string jsonspec which controls which of the implementing classes of UserInfo is returned. Specifically, there is a JSON string element