mardi 21 juillet 2015

Get the value of a generic declaration programmatically?

I declare a class as follows:

public class SomeClass extends AdditionalClass<GenericClass> {
  ...
}

This...

SomeClass object = new SomeClass();
System.out.println(object.getSuperClass().getSimpleName());

...yields "AdditionalClass". What method call or calls would allow me to interrogate that object and get "GenericClass" as a result?





Aucun commentaire:

Enregistrer un commentaire