title: How do I access default parameter values via Scala reflection?
body: <p>Let's say a I have a class:</p>
  
  <pre><code>case class Foo(id: Int, name: String, note: Option[String] = None)
  </code></pre>
  
  <p>Both the constructor and the apply method in the automatically generated companion object take three parameters.  When viewed via reflection, the third parameter (note) is flagged:</p>
  
  <pre><code>p.isParamWithDefault = true
  </code></pre>
  
  <p>Also, by inspection I can find the method that produces the value in the companion object:</p>
  
  <pre><code>method &lt;init&gt;$default$3
  </code></pre>
  
  <p>and</p>
  
  <pre><code>method apply$default$3
  </code></pre>
  
  <p>Which both also have:</p>
  
  <pre><code>m.isParamWithDefault = true
  </code></pre>
  
  <p>However, I can neither find anything on the TermSymbol for the notes parameter that actually points me at the right methods to obtain the default value nor anything on the above MethodSymbols that point back to the TermSymbol for the parameter.</p>
  
  <p>Is there a straight forward way to link TermSymbol for the parameter with the method that generates its default value?  Or do I need to do something kludgey like inspect the names of the methods on the companion object?</p>
  
  <p>I'm interested in this both for the case class constructor example I have here and for regular methods.</p>