title: Why an inline function defined in a Kotlin file cannot be used in Java code?
body: <p>I'm trying to understand why I cannot use my inline function defined in a Kotlin file in my Java code?</p>
  <p><strong>Project details</strong></p>
  <p>Kotlin: 1.5.20 - Java: 15.0.1</p>
  <p>Mixed code (Java + Kotlin). I have same package structure both in Java &amp; Kotlin as below:</p>
  <p><code>com.app.company.util</code>.Util.java</p>
  <p><code>com.app.company.util</code>.Util.kt</p>
  <p>In <code>Util.kt</code> I have an inline function as below:</p>
  <pre><code>val commonMapper = jacksonObjectMapper()
  
  inline fun &lt;reified T&gt; parseJson(content: String): T {
     return commonMapper.readValue(content)
  }
  </code></pre>
  <p>I noticed that since I have the same name <code>Util</code> for both Java class and Kotlin file, If I want to refer to the Kotlin file I have to use <code>UtilKt</code>. I found this by decompiling the Kotlin file.</p>
  <p>Interestingly, only <code>commonMapper</code> is exposed by <code>getCommonMapper()</code> method not <code>parseJson</code>.</p>
  <p>Could someone please help me understand why <code>parseJson</code> is not visible from Java?</p>