title: How to get current class filename in kotlin
body: <p>In Java I can use the following code:</p>
  
  <pre><code>public class Ex {
      public static void main(String [ ] args) {
          String path = Ex.class.getProtectionDomain().getCodeSource().getLocation().getPath();
          String decodedPath = URLDecoder.decode(path, "UTF-8");
      }
  }
  </code></pre>
  
  <p>but in Kotlin, the main function is defined outside out of a class. How can I get it's current file name?</p>