How do I do the equivalent of "myClass[].class" with ArrayList<myClass>?
<p>I'm using the GSON library and calling the fromJson() method:
<a href="http://google-gson.googlecode.com/svn/tags/1.2.3/docs/javadocs/com/google/gson/Gson.html" rel="nofollow">http://google-gson.googlecode.com/svn/tags/1.2.3/docs/javadocs/com/google/gson/Gson.html</a></p>

<p>My old code:</p>

<pre><code>String s = new GsonBuilder().create().fromJson(responseString,myClass[].class);
</code></pre>

<p>Works fine, but I'm moving the collection from an array to an ArrayList and I can't figure out the syntax to use to pass the type to this method. If I understand correctly the existing code is passing the type (an array of myClass objects) to the method, which it then creates from the JSON response.</p>

<p>But I have tried all the syntax combinations I can think of and I'm stumped for how to do what I thought would look like this:</p>

<pre><code>String s = new GsonBuilder().create().fromJson(responseString, ArrayList&lt;myClass&gt;.class );
</code></pre>
