Let clients create objects by naming an abstract superclass and by providing a specification.
使客户程序可以通过命名抽象超类和给定规约来创建对象。
Normally, the type checker ensures that these super-constructor calls will succeed by looking up the superclass and making sure that a matching super-constructor exists.
通常,通过查找超类并确保存在匹配的超级构造函数,类型检查器确保这些超级构造函数调用会成功。
Select the Constructors from superclass and Inherit abstract methods fields See figure 8.
选择Constructorsfromsuperclass andInheritabstractmethods字段,如图8所示。
Select the Constructors from superclass and Inherit abstract methods fields as shown in figure 10.
选择Constructorsfromsuperclass andInheritabstractmethods字段,如图10所示。
I can check both (before and after) by calling the invoke method in the superclass and sending before and after notifications, depending on what I find.
可以调用超类中的invoke方法同时检查这两者(before和after),并根据查找结果发送before和after通知。
Select the Constructors from superclass and Inherit abstract methods fields See figure 9.
选择Constructorsfromsuperclass andInheritabstractmethods字段,如图9所示。
Select the check boxes for Constructors from superclass and Inherited abstract methods, and click Finish.
为Constructorsfromsuperclass与inheritedabstractmethods选择复选框,并点击Finish。
The dialog box that displays is similar to the Extract Interface dialog box and allows you to name the new superclass and select the methods and fields that will be put in the superclass.
一个与ExtractInterface相似的对话框会出现,可以在这个对话框中给这个新的超类命名并选择要放入这个超类的方法和字段。
Select the Constructors from superclass and Inherit abstract methods fields as shown in figure 11.
选择Constructorsfromsuperclass andInheritabstractmethods字段,如图11所示。
You learned how to define new properties and call corresponding functions in the superclass and how to use the new class in your application code.
您也学习了如何定义新的属性,在子类中调用相应函数,以及如何在您的应用程序代码中使用这个新类。
If fields make sense for one subclass but not the other, you can remove them from the superclass and push them down into the subclass they belong to.
如果一些字段对于某个子类有意义,但是对于其他子类没有意义,就可以把它们从超类中删除,并放到它们所属的子类中。