there are methods in the interface:
after()
before()
doInit()
when calling, I want to call the above three methods in this method by calling a method execute ()
. How should I design the class?
there are two ways of thinking now:
-
Add a method to the
- interface:
execute ()
, and call the above three methods during implementation. - adds an abstract method, and then there is a
excute ()
that also calls three.
personally, it seems better to use abstract methods, but I don"t know what"s good about it, or if there is a better design.
Thank you