Get all the classes that implements a trait in Scala using reflection
问题 I want to list out all the case classes which implements a particular trait. I am currently using Clapper ClassUtil for doing that. I am able to get the case classes that are directly implementing a trait. However, I am not able to get the other classes which are not directly implementing the trait. How can I get all classes which directly or indirectly implements a trait. ? val finder = ClassFinder() finder.getClasses().filter(_.isConcrete).filter(_.implements("com.myapp.MyTrait")) Scala