Let's say that I have a class Foo:
public class Foo
{
public static var bar:String = "test";
}
How can I reference bar at runtime using the string "Foo" or/and and instance of Foo and the string "bar"?
I.e.
var x:Object = new Foo();
...
x["bar"]
...doesn't work, debug mode in IntelliJ got my hopesup as bar gets listed as a property.
Update:
Note that at the "point of action" I don't know anything about foo in compile time. I need to resolve Foo.bar through the strings "Foo" and "bar".
Of put differently, as flex don't have eval how can I accomplishe the same as eval("Foo.bar")?