title: How to get a list of classes that extend from a base class in Kotlin?
body: <p>consider following classes structure in Kotlin:</p>
  <pre class="lang-kotlin prettyprint-override"><code>open class Base {
     ...
  }
  
  class A : Base() {
     ...
  }
  
  class B : Base() {
     ...
  }
  
  ...
  
  class Z : Base() {
     ...
  }
  </code></pre>
  <p>How would I go around getting a list of ALL classes (<code>A</code>-<code>Z</code> in this particular example) that inherit from <code>Base</code> class?</p>
  <p>I tried using reflection with <code>BaseTest::class.nestedClasses</code> and other reflection properties but they don't seem to be finding number of extending classes properly.</p>