title: Can a VFP class get a collection of it's own methods at run-time?
body: <p>Here's what I'm trying to accomplish, in Visual FoxPro.  I want to write a parent UnitTest class, that can be subclassed to create individual unit tests. I am hoping that the parent UnitTest can have a MainMethod which examines itself, and then finds and executes all of it's own methods which begin with "test_".  </p>
  
  <p>This way I can go forward writing appropriately named functions in my unit tests, and the parent will know how to run them without any additional input from me.  But, I can't locate any way to get this information from VFP at run-time, without having the child class explicitly define a collection of method names or something to that regard (which is exactly what I'm hoping to avoid).  </p>
  
  <p>Here's is a basic stub:</p>
  
  <pre><code>define class UnitTest as custom  &amp;&amp; would be abstract if VFP supported that
  
      procedure MainMethod()
          &amp;&amp; run all methods that begin with test_
      endproc
  
  enddefine
  
  define class AUnitTest as UnitTest
  
      procedure test_thingA()
          ...
      endproc
  
      procedure test_thingB()
          ...
      endproc
  
  enddefine
  </code></pre>
  
  <p>Would love anyone's ideas on how to get at the child methods from the parent.  (Also open to a better implementation idea, if I'm going about this wrong, I think the basic idea of what I'm going for is clear).</p>
  
  <p>Thanks so much in advance!</p>