We have a C# code base that we have to deploy on Java.
We are creating a migration engine that reads C# and writes Java.
We have created stub class for the classes from system that are used in our code, and are implementing them.
When I came to do List<T>
in Java, I ran into problems while implementing ToArray
.
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.
Is this final, or any of you know of some clever way of doing ToArray
in a generic class without passing an array or a type as a parameter here or in the constructor.