Given two classes like this:
class Example1<A,B> {
public Map<A,B> someMap = new HashMap<A,B>();
}
class Example2 extends Example1<URL, URL> {
}
Is there any way using reflection that I can determine the component types of the Map for Example2?
I know I can do:
ParameterizedType t = (ParameterizedType) Example2.class.getFields()[0].getGenericType();
But from there, I can't seem to figure out that the two components are URLs.
Does anyone have any ideas?