title: Generic Static Constant
body: <p>It's hard to explain but I basically want to be able to have an interface which my subclasses need to implement, which mandates a static constant. How would I achieve this in Kotlin?</p>
  
  <p>I have the following class/interface:</p>
  
  <pre><code>interface BaseFragmentInterface {
    val TAG: String
  }
  
  class BaseFragment: Fragment() {
    /* this, of course, doesn't compile right now: */
    companion object: BaseFragmentInterface {}
  
    func&lt;T: BaseFragment&gt; push(fragment: T) {
      /* Here I want to access TAG */
      Log.d(T.TAG, "Push Fragment")
    }
  }
  </code></pre>
  
  <p>My subclasses need to be required to implement the interface. And my base companion object would need to be somehow <code>abstract</code>. </p>
  
  <p>Any idea how to achieve this?</p>