title: Kotlin: How can I use delegated properties in Java?
body: <p>I know that you can't use the delegated property syntax in Java, and won't get the convenience of "overriding" the set/get operators as in Kotlin, but I'd still like to use an existing property delegate in Java.</p>
  
  <p>For instance, a simple delegate of an int:</p>
  
  <pre><code>class IntDelegate {
      operator fun getValue(thisRef: Any?, property: KProperty&lt;*&gt;) = 0
  }
  </code></pre>
  
  <p>In Kotlin of course we can use this like so:</p>
  
  <pre><code>val x by IntDelegate()
  </code></pre>
  
  <p>But how can we use <code>IntDelegate</code> in some form in Java? This is the start, I believe:</p>
  
  <pre><code>final IntDelegate x = new IntDelegate();
  </code></pre>
  
  <p>And then using the functions directly. But how can I use the <code>getValue</code> function? What do I pass for its parameters? How do I get a <code>KProperty</code> for  Java field?</p>