How to Get Type's Class of a Collection
PatchaJan 25 2012 — edited Jan 25 2012Hi all,
I just wanna ask if there is a simple way to get the type's Class of a Collection.
For example, for an ArrayList<String> or List<Integer> objects, how do I dynamically get "String" or "Integer" Class object (expecially with generic types) without making strange sequences of reflections?
Thank you!