Create guice singleton with gson
<p>I am trying to create a guice singleton from a json config file.</p>

<p>My singleton is the config:</p>

<pre><code>@Singleton
public class QConfig {

    private int port;

    public int getPort() {
        return port;
    }
}
</code></pre>

<p>I use gson to generate the object:</p>

<pre><code>    String content = ...
    QConfig config = new GsonBuilder().create().fromJson(content, QConfig.class);
</code></pre>

<p>Is there a way that I can generate the QConfig class myself and still use it a as a singleton</p>