Get a class name with generics information
- by Damien
Hello,
In a java serialization problem, I want to save some classes name and I have some problems with generic classes.
For example :
- If I have ArrayList<String> listToDump = new ArrayList<String>();
- If I take the name : listToDump.getName(); or listToDump.getCanonicalName();
- I will have java.util.ArrayList or ArrayList
- And I want to have java.util.ArrayList<String> or ArrayList<String>
Any ideas on how I can do this?
Damien.