title: Get all the classes that implements a trait in Scala using reflection
body: <p>I want to list out all the case classes which implements a particular trait. I am currently using <a href="http://software.clapper.org/classutil/" rel="noreferrer">Clapper ClassUtil</a> 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. ?</p>
  
  <pre><code>val finder = ClassFinder()
  finder.getClasses().filter(_.isConcrete).filter(_.implements("com.myapp.MyTrait"))
  </code></pre>
  
  <p>Scala Version : <code>2.11</code></p>
  
  <p>Clapper Class Util Version : <code>1.0.6</code></p>
  
  <p>Is there any other way I can get these information? Can someone point me to the right direction?
  I tried using <code>scala.reflect</code> but could not understand how to get the info.</p>
  
  <pre><code>EDIT:
  </code></pre>
  
  <p>Sample traits and usages:</p>
  
  <pre><code>trait BaseEntity
  trait NamedEntity{ val name:String}
  trait MasterDataEntity extends NamedEntity
  
  case class Department(id:Long, override val name:String) extends MasterDataEntity
  case class Employee(id:Long, name:String) extends BaseEntity
  case class User(id:Long, override val name:String) extends NamedEntity
  </code></pre>
  
  <p>Now, if I give the trait as <code>NamedEntity</code>, I should be able to get both <code>Department</code> and <code>User</code> since they both are directly or indirectly implementing NamedEntity. With <code>implements</code> method, it will give only User. I also tried by using <code>interfaces</code> method, which will also provide the direct super classes only.</p>