find all classes and interfaces a class extends or implements recursively

后端 未结 8 1220
孤独总比滥情好
孤独总比滥情好 2021-02-12 22:13

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         


        
8条回答
  •  终归单人心
    2021-02-12 22:25

    There is a ClassUtils in the Apache Common Lang that have the 2 methods you want. .getAllSuperClasses() and .getAllInterfaces().

提交回复
热议问题