So i need to extract the types of attributes from java files. I am currently using the parser qdox to do this. It works fine for the most part.
The problem is that when I have attributes that have a type like this List<String>
I need to get the full name of String
i.e java.lang.String
.
But it seems that qdox canĀ“t extract the full name of the generic typ. Is there any way to get it?
Generics are not preserved in the runtime due to Type Erasure.
You can inspect every element in the
List
but the<String>
part of the type is not accessible for running program.