title: How do I call a function written in a kotlin class , in java?
body: <p>I am using both Kotlin and java in my codebase.
  But I was wondering if there is a way I can reference a kotlin function from java?
  Here's my kotlin code :
  MyEvent.kt </p>
  
  <pre><code>open class MyEvent {
      @Inject
      lateinit var myService: MyService
  
      @Inject
      lateinit var app: MyApp
  
      var name: String = ""
      var options: MutableMap&lt;String, String&gt; = hashMapOf()
      var metrics: MutableMap&lt;String, Double&gt; = hashMapOf()
  
      init {
          app.component.inject(this)
      }
  
      fun identify() {
          myService.identify()
      }
  
  }
  </code></pre>
  
  <p>Now, in my base application class call "MyApplication", I want to call identify function. (I . know in kotlin we can do this via MyEvent().identify ) but was wondering how do we go about it in java?
  Any clue?</p>
  
  <p>Thanks in advance!</p>