title: Converting Kotlin's KClass to regular Class in Java
body: <p>I am trying call a regular Java method in a Java code as follows:</p>
  
  <pre><code>public &lt;T&gt; T proxy(KClass&lt;T&gt; kClass) { 
      // unfortunately nothing like getJavaClass() exists
      return (T) proxy(kClass.getJavaClass()); 
  }
  
  public &lt;T&gt; T proxy(Class&lt;T&gt; jClass) {
      return (T) context.getBean(jClass);
  }
  </code></pre>
  
  <p>In Kotlin, you can call <code>.java</code> on each KClass. This is not the case here and I am unable to extract the Java Class object from KClass. Is there a way to do it?</p>
  
  <p>EDIT: This is trivial in Kotlin, but I am looking for solution in Java code.</p>