1·If you have more than three, or more than seven subclasses of a single exception superclass, my bet is that something is wrong.
如果有三层以上,或者在一个异常超类中子类的个数超过了七个,那我打赌一定有什么地方出错了。
2·If two classes need to support the same interface, they should both extend the same superclass.
如果两个类需要支持相同的接口,它们都应该扩展相同的超类。
3·Template methods can be provided by the implementer, who must not forget that the superclass can potentially have implemented its template methods.
模板方法可以由实现者提供,但必须注意的一点是超类有可能已经实现了其模板方法。
4·So before an object is created, another object of the same class or of its superclass must be constructed.
所以在创建对象之前,必须构造相同类或其超类的另一个对象。
5·A method of a superclass can be extended by declaring an attribute with the same name.
超类的方法可以通过使用相同的名称声明属性来扩展。
1·Another difference you'll notice are several radio buttons and a checkbox for selecting the superclass.
您还会注意到的另一个差别是有多个单选按钮和一个用于选择父类的复选框。
2·That's just the start for CtClass, though, which also defines methods for adding new fields, methods, and constructors to the class, and for altering the class name, superclass, and interfaces.
不过,这只是CtClass的部分内容,它还定义了在类中添加新字段、方法和构造函数、以及改变类、父类和接口的方法。
3·Note: Your implementation of these lifecycle methods must always call the superclass implementation before doing any work, as shown in the examples above.
注意:你的这些生命周期方法的实现必须总是在你做任何工作之前调用父类的实现,像上面展示的那样。
4·The default constructor invoked the no - arg constructor of the superclass.
默认构造函数调用父类的无参数构造函数。
5·Access protected fields of a subclass in a superclass?
访问受保护的子类在父类的域?
1·Also, each subclass inherits methods from the superclass.
同时,每个亚纲继承来自总纲的方法。