title: Get default value of kotlin fun parameter in annotation processing phase
body: <p>Background:
  I have an annotation processor that builds retrofit interfaces by scanning spring annotations on controllers.  I have it set up to work in either kotlin or java based spring applications, and it can generate either kotlin or java retrofit client interfaces.</p>
  
  <p>Question:
  When running it against a kotlin based spring application, is there a way to pick up a default value on a controller function, whether reflectively or through some other means?</p>
  
  <p>e.g. the controller function looks something like </p>
  
  <pre><code>@RequestMapping("/foo")
  fun getSomething(@RequestParameter foo: String = "bar") {
  ...
  
  }
  </code></pre>
  
  <p>and I want to be able to generate a retrofit interface method that looks something like </p>
  
  <pre><code>fun getSomething(@Header foo: String = "bar")
  </code></pre>
  
  <p>I am aware that the compiler under the hood actually creates multiple override methods for the jvm:
  <a href="https://discuss.kotlinlang.org/t/retrieve-default-parameter-value-via-reflection/7314" rel="nofollow noreferrer">https://discuss.kotlinlang.org/t/retrieve-default-parameter-value-via-reflection/7314</a></p>
  
  <p>But I'm wondering if there's a way to capture these defaults during the annotation processing phase or if I just have to live without defaults in the generated kotlin client.</p>
  
  <p>Long story short - is there a workaround that would let me capture these defaults?</p>