ClassA
has two children : ClassB
and ClassC
.
We need to override a method of ClassA
but we will be using ClassB
and ClassC
(with the modified method).
ClassA
, ClassB
and ClassC
are all part of an external library which we can not modify.
Is it possible to get this done without subclassing ClassB
and ClassC
seperately using the same re-implementation of the method in each subclass?
Would the problem be different if ClassB
already had a re-implementation of the method that we wanted to ignore?