I want to return an instance of an object of same type of the Class object passed in. The type passed in can be ANYTHING. Is there a way to do this with Generics?
To
If you aren't trying to do anything fancy with the object during the creation, what's wrong with just using a good old fashioned constructors?
You should be able to use something similar to:
public T getObject(T obj) { return obj.newInstance(); }