I agree in principle, you do not need to know in most situations.
However, one use case, when it may be useful to know, is debugging when some information arrives, in case of an unsuccessful passed parameter.
However, in this case, it is probably better to throw an exception, register an exception and "restore" from it. Obviously, this depends on how often the method is called, since when creating an exception, there is always some overhead. If you need to do this for some other reason, I would suggest you take a look at your design first.
If you need callbacks, I would suggest that you do A and B and implement the interface and pass A or B as a parameter. An interface can have a method called a callback, and C can call A or B.
source share