Hi guys,
I am writing a method which given an instance of a class and a type (as a string), it will return an instance of the named type constructed from the instance if possible, null otherwise.
So say,
class A{
A(B b) {
..
}
..
}
class B {
B(C c) {
//
}
// …
}
class C {
// ..
}
so method, conversion(new C(), "A"), should return A as conversion from C->A exists. Any ideas?