Required method?
Is it possible to write a class that, when instantiated by another class, requires the call of a certain method, or else will not compile?
For example:
I have two classes: A & B.
I want to write B such that when A instantiates B, it must call a certain method in B from somewhere within A. If that certain method is not called, I want to keep the class from compiling.
Is this possible?
|