...骤的模板方法(public),Template Method模式把这些可以被细分的可变步骤抽象为可以被子类重载的抽象方法(protected abstract),并通过在子类中的重载(重新定义),做到无需改变模板方法的算法步骤而可以重新定义该算法中的某些特定的步骤。
基于12个网页-相关网页
In this case we do not define an instance variable in the injectee, but an abstract method returning the required object. The method may be public or protected
在这个例子中,我们没有在被注入者中定义一个实例变量,而是定义了一个返回所需对象的抽象方法。
Abstract: Right, as the protected object of fault tortious liability, can't be taken as the foundation of this liability.
摘要权利仅能作为过错侵权责任的保护对象,而不能作为责任的发生基础。
To fix a violation of this rule, either make the constructor protected, or do not declare the type as abstract.
如果需要修复这个问题,可以声明这个构造函数为保护型,或者,声明这个类型不是一个抽象类型。
应用推荐