title: Kotlin read property annotation via reflection
body: <p>I've created an annotation for properties and now I want to read it via reflection at runtime. In my opinion I'm doing everything right but there's no annotation.</p>
  
  <p>Why isn't the annotation not available?</p>
  
  <pre><code>@Retention(AnnotationRetention.RUNTIME)
  @Target(AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER)
  annotation class MyAnnotation
  
  class MyClass(@MyAnnotation val attr: List&lt;String&gt;)
  
  fun main(args: Array&lt;String&gt;) {
      var prop = MyClass::attr
      prop.annotations.forEach { println("prop.annotations -&gt; " + it) }
      prop.javaClass.getAnnotations().forEach { println("prop.javaClass.getAnnotations -&gt; " + it) }
      println("isAnnotationPresent -&gt; ${prop.javaClass.isAnnotationPresent(MyAnnotation::class.java)}")
  }
  </code></pre>
  
  <p><strong>Output:</strong><br/>
  <em>prop.javaClass.getAnnotations -> @kotlin.Metadata(xi=0, bv=[1, 0, 3], mv=[1, 1, 16], k=3, xs=, d1=[], d2=[], pn=)
  isAnnotationPresent -> false</em></p>