I was wondering if there was an easy way of determining the complete list of Types that a Java class extends or implements recursively?
for instance:
cla
If I got your question right, you want to find all the superclasses (class and interface) of a specific class. If so you can check the following solution
to find the superclasses
Class C = getClass();
while (C != null) {
System.out.println(C.getSimpleName());
C = C.getSuperclass();
}
to find the interfaces
C = getClass();
for(Class adf: C.getInterfaces()){
System.out.println(adf.getSimpleName());
}