I have a field x. x’s type is “SomeCoolObject”. SomeCoolObject extends CoolGeneric<String>. How could I get String from the x field? (Get the generic type of x’s super’s generic.)
Normally, I would do x.getGenericSuper(), but that won’t preserve the type information if SomeCoolObject also had separate generic types. (Eg. SomeCoolObject<T> extends CoolGeneric<String>)