Constructor functions (also called constructors) provide the ability to design and implement your own prototype-based objects.
构造函数提供了一种能力,使用户能设计和实现自己的基于原型的对象。
The object-pool interface needs the type information, because constructors are called.
object - pool接口需要类型信息,因为要调用构造函数。
Then, inside the generic class definition, the only constructors that could be called are those declared in the bound.
因而,在泛型类定义内部,唯一可调用的构造函数是那些在界限中声明的构造函数。
Changing the order in which the widget constructors are called is not possible, since this would change the order in which the widgets are packed.
不可能改变窗口小部件构造函数的调用次序,因为这将改变窗口小部件包装的次序。
We’ll see how to define auxiliary constructors in the section called “Constructors in Scala” in Chapter 5, Basic Object-Oriented Programming in Scala.
在《第5章 -Scala 的基本面向对象编程》的“Scala 的构造函数”章节中,我们会看到如何定义辅助的构造函数。
We can't know whether the super-constructors called in Scrollable are valid unless we know all the ways in which type parameter t is instantiated for JSplitPanes.
除非我们知道将类型参数t实例化为JSplitPanes的一切方法,否则我们不能知道在Scrollable中调用的超级构造函数是否有效。
Or you could declare it in an initialization method that is called by all constructors.
或是可以在所有建构函式呼叫的初始设定方法中宣告。
Constructors are methods that are called when the object is first created.
构造函数是在第一次创建对象时调用的方法。
Static constructors are called at some point between when the program starts and the class is instantiated.
静态构造函数在程序开始和类实例化之间的某个时刻调用。
These are sometimes called positional arguments because they are supplied to attribute constructors as positional parameters.
因为他们被定义为特性的构造函数的位置参数(非命名参数),通常称它们为位置参数。
A link demand performed on a static class constructor does not protect the constructor because static constructors are called by the system, outside the application's code execution path.
对静态类构造函数执行的链接要求不会保护该构造函数,因为静态构造函数是由系统调用的,它们并不包括在应用程序的代码执行路径中。
This constructor is called by derived-class constructors to initialize the base class and is not intended for use directly from your code.
此构造函数由派生类构造函数调用以初始化基类,不适合直接在代码中使用。
This constructor is called by derived-class constructors to initialize the base class and is not intended for use directly from your code.
此构造函数由派生类构造函数调用以初始化基类,不适合直接在代码中使用。
应用推荐