title: How to pass any (known at runtime only) Kotlin enum as parameter to a method in Java code?
body: <p>Say we have enums</p>
  
  <pre><code>enum class Status {
      OPEN, CLOSED
  }
  
  enum class Weekday {
      WORKDAY, DAYOFF
  }
  </code></pre>
  
  <p>Having a Java class</p>
  
  <pre><code>public KotlinInvoker {
      public methodWithKotlinEnumAsParameter_namely_AppendWorkingStatusString( ? kotlinEnum) {
      ...
      }
  }
  </code></pre>
  
  <p>The Goal is to directely pass ANY jave / kotlin enum to that kind of the function like if Java you would have a  </p>
  
  <pre><code>    &lt;E extends java.lang.Enum&lt;E&gt;&gt;
      methodAcceptingEnumAsParameter(E enum) {
      ...
      return result + ' ' + enum.toString();
      }
  </code></pre>
  
  <p>so you can pass ANY enum to it.
  what should be the method signature to play nicely with kotlin enum as well as it is mapped to java enum accordingly to official kotlin docs?</p>