I'm trying to access variables of an object by using strings whose values are determined at run time.
Basically the object is used as a dictionary, and now I want to dynamically poll values from that dictionary
A simplified example:
object Something extends scala.AnyRef {
final val zero = 0
final val one = 1
final val two = 2
}
I would then principally like to do the following
Somthing."zero"
and get 0 in return.
Ideally I would like to use scala reflection for this