Regardless of whether or not this is a good idea, is it possible to implement an interface where the executing function is aware of the calling object\'s type?
You could examine the call stack, but that is both expensive and fragile. When your code is jit'ed the compiler might inline your methods so while it could work in debug mode you could get a different stack when compiled in release mode.