find all classes and interfaces a class extends or implements recursively

后端 未结 8 1206
孤独总比滥情好
孤独总比滥情好 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:23

    I have once implemented similiar mechanism using asm on some ShrinkWrap branch https://github.com/mmatloka/shrinkwrap/commit/39d5c3aa63a9bb85e6d7b68782879ca10cca273b . The issue is sometimes class might use object which is an interface implementation not mentioned in other file so it still can fail during deployment.

    From what I know some time ago official position was rather not to include such feature inside of the ShrinkWrap, but rather rely on tooling e.g. JBoss Tools, where should be a feature allowing for recursive class additions.

提交回复
热议问题