title: Scala: How to access a class property dynamically by name?
body: <p>How can I look up the value of an object's property dynamically by name in Scala 2.10.x?</p>
  
  <p>E.g. Given the class (it can't be a case class):</p>
  
  <pre><code>class Row(val click: Boolean,
            val date: String,
            val time: String)
  </code></pre>
  
  <p>I want to do something like:</p>
  
  <pre><code>val fields = List("click", "date", "time")
  val row = new Row(click=true, date="2015-01-01", time="12:00:00")
  fields.foreach(f =&gt; println(row.getProperty(f)))    // how to do this?
  </code></pre>