Is it possible to determine the class of Any object at runtime? And convert the class into human readable string?
Also is it possible to obtain list of methods that this object supports?
class Foo {
let desc = "Foo"
}
class Bar {
let desc = "Bar"
}
var x:Any = Foo()
var className = "___WHAT COMES HERE_____"
println("x is class=\(className)")
// also print list of methods on x if possible
x = Bar()
className = "___WHAT COMES HERE_____"
println("x is class=\(className)")