title: How to obtain a KType in Kotlin?
body: <p>I'm experimenting with the reflection functionality in Kotlin, but I can't seem to understand how to obtain a KType value.</p>
  
  <p>Suppose I have a class that maps phrases to object factories. In case of ambiguity, the user can supply a <code>type</code> parameter that narrows the search to only factories that return that type of object (or some sub-type).</p>
  
  <pre><code>fun mapToFactory(phrase: Phrase,
            type: KType = Any::class): Any {...}
  </code></pre>
  
  <p><code>type</code> needs to accept just about anything, including <code>Int</code>, which from my experience seems to be treated somewhat specially. By default, it should be something like <code>Any</code>, which means "do not exclude any factories".</p>
  
  <p>How do I assign a default value (or any value) to <code>type</code>?</p>