How to get the implementation type at runtime
<p>I have a iterface called A. Now i derive 3 classes from interface A. </p>

<p>How i can i add some method to the interface like getType() which return me the right type of instance I am dealing with. I don't want to do something like demo instanceOf A in nested if else for checking the instance type.</p>
