I have several classes:
public class SubclassA extends ClassA implements InterfaceA
public class SubclassB extends ClassB implements InterfaceA
public class SubclassC extends ClassC implements InterfaceA
...
is there any possibility to redirect all functioncalls to functions you can find in the interface to another class/object?
means if that is the interface:
public interface InterfaceA{
public void doIt();
}
and that is the HelperClass:
public class HelperClass implements InterfaceA{
public void doIt(){
...
}
}
is it possible that i redirect all calls of the the classes SubclassA, SubclassB, SubclassC etc to the function doIt() of the HelperClass? (Ofc without writing the calls into every implementation of every function) or if there is no way do you know a way to let it eclipse do? there are lots of classes where i would need to write the same...
I'd be happy if anybody could show me a way to do that. Thanks in advance.