在最深的类继承的构造函数参数太多了吗?
Too many constructor arguments in deepest class of inheritance?
在我们希望允许类继承类型参数时立即出现的紧迫问题是要决定我们能调用什么样的超级构造函数?
An immediate and pressing problem that arises as soon as we want to allow for classes that extend a type parameter is to decide what super-constructors are we able to call?
惟一需要以这种方式使用一个类的是一个默认构造函数(它允许您创建继承自类的一个匿名内部类)。
The only thing a class needs to be used this way is a default constructor (which allows you to create an anonymous inner class instance inheriting from your class).
给定一个对象(比如下面定义的Foo),静态横切使得创建新方法、添加附加的构造函数,甚至改变继承层次都变得十分简单。
Given an object (such as Foo, defined below), static crosscutting makes it quite simple to create new methods, add additional constructors, and even alter the inheritance hierarchy.
阐释如何使用继承将一组通用属性和方法添加到用给定构造函数创建的对象。
Illustrates how to use inheritance to add a common set of properties and methods to objects created with a given constructor function.
讨论值类型语义的更改,包括继承的虚方法、类默认构造函数、内部指针和钉住指针。
Discusses changes to value type semantics, including inherited virtual methods, class default constructors, interior Pointers, and pinning Pointers.
类的成员包括在类中声明的所有成员,以及在该类的继承层次结构中的所有类中声明的所有成员(构造函数和析构函数除外)。
A class's members include all the members declared in the class, along with all members (except constructors and destructors) declared in all classes in its inheritance hierarchy.
派生类中的所有方法(包括类的构造函数)都必须满足该继承要求。
All methods in the derived class, including the constructor for the class, must meet the inheritance demand.
派生类中的所有方法(包括类的构造函数)都必须满足该继承要求。
All methods in the derived class, including the constructor for the class, must meet the inheritance demand.
应用推荐