java - Changing interface method arguments -
let's have interface myinterface has method do()
. have classes implement interface. interface called throughout code , calls specific implementation via factory. later on decide change do()
method adding argument it, let's - do(numberoftimes)
. clients broken when call myinterfaceold.do()
implementation do()
method not found. can add do()
method argument, breaks clients well. straightforward way change do()
method in myinterface , update clients, there way without needing update clients?
Comments
Post a Comment