Generics, ToArray etc
<p>We have a C# code base that we have to deploy on Java.</p>

<p>We are creating a migration engine that reads C# and writes Java.</p>

<p>We have created stub class for the classes from system that are used in our code, and are implementing them.</p>

<p>When I came to do <code>List&lt;T&gt;</code> in Java, I ran into problems while implementing <code>ToArray</code>.</p>

<p>For what I understand, because of the major deference between Java and C# in terms of generics, there is no way of knowing the type of the generic class, and thus no way of creating a typed array.</p>

<p>Is this final, or any of you know of some clever way of doing <code>ToArray</code> in a generic class without passing an array or a type as a parameter here or in the constructor.</p>
