title: Kotlin invoke constructor using reflection
body: <p>For a simple machine language reader, I have a number of classes AaaInstruction, BbbInstruction, CccInstruction, etc. which are invoked as aaaInstruction(v1, v2, v3).  The idea is that the input is given in the form:</p>
  
  <pre><code>aaa v1 v2 v3
  
  bbb v1 v2 v3
  
  ccc v1 v2 v3
  </code></pre>
  
  <p>In the main class I use the following code:</p>
  
  <pre><code>var input = Scanner(System.`in`)
  
  val instcode = input.next()
  
  val cname: String = instcode.capitalize()+"Instruction"
  </code></pre>
  
  <p>How can I then invoke <code>cname(v1,v2,v3)</code>? </p>