Template method pattern

February 8, 2020 · View on GitHub

23 种设计模式之一

In software engineering, the template method pattern is a behavioral design pattern that defines the program skeleton of an algorithm in an operation, deferring some steps to subclasses. It lets one redefine certain steps of an algorithm without changing the algorithm's structure.

hook methods

Template method's abstract class may also define hook methods that may be overridden by subclasses