As an example, given the following Scala case classes...
case class A(str: String, num: Number)
case class B(as: Seq[A])
case class C(b1: B, b2: B)
... and an object hierarchy...
val c = C(B(Seq(A("SA",23),A("SB",42))),B(Seq()))
...I'd like to be able to do something like this:
val bindingString = "b1.as[1].num"
val value = get(c, bindingString)
assert value == 42
Certainly the core functionality required for this has already been implemented in a few libraries based on macros or reflection.
Is there already a library that offers just this? Or alternatively a part of an existing open source library which could be extracted?