Hello All,
Firstly, this is just an Object Oriented Programming question and does not apply to any Language in particular.
This is quite embarassing for me. This incident happened @ work and I was too shy to clarify this with my colleagues as it would indicate a poor understanding of Object Oriented Programming on my part. So here is the incident :
There is a class A which implements interface I. This interface has a method M. Class A has defined the body or rather implementation of this method. Now I have a tool with which I can find out which other class or program uses, or in other words calls Class A -> method M.When I used this tool, it did not return any results; An indication which I took as no class is calling method M.
When I shared my observations with a senior colleague, he simply went to the interface I -> method M, and used the tool on this. It returned quite a few results. He told me that these are the classes or methods which call method M and asked me to proceed.
This result is obviously a list of those classes which implement interface I. But what I didn't understand is that how is this the set of classes or methods which call Class A -> method M. Since I had confidently told my colleague that no class calls method M, after he showed me the result list, I was too embarassed to ask him how is that the result that I am looking for.
Any idea what my colleague is hinting at?
Regards, Mithun