构造函数

ɡòu zào hán shù
  • constructed function
构造函数构造函数
  1. 我们已经使用其构造函数new来说明了这一点。

    We 've instantiated it using its constructor , new .

  2. 您知道Set有一个拷贝构造函数。

    You know that Set has a copy constructor .

  3. 首先,添加构造函数至Product类。

    First , add a constructor to the Product class .

  4. 拥有构造函数之后,就可以使用new操作符来创建对象了,如下所示

    Once I have a constructor function , I can use the new operator to create objects , as shown below

  5. C私有构造函数在设计模式中的应用

    Application of C # Private Constructor in Design Patterns

  6. 类B的构造函数没有参数。

    B.Class B 's constructor has no arguments .

  7. Pattern没有公共的构造函数。

    Pattern has no public constructor .

  8. 该回调处理方法必须有一个构造函数,该函数将Map

    The callback handle must have a constructor , which takes a Map

  9. Spring中的构造函数注入允许您通过类构造函数注入依赖关系。

    Constructor injection in Spring lets you inject your dependencies through class constructors .

  10. Web服务器启动时执行的代码大致如下(可在构造函数中注入依赖对象)

    And the code that the web server runs on startup looks like this ( assuming constructor injection )

  11. 首先,Prototype的Request对象为其构造函数获取两个参数。

    For starters , Prototype 's Request object takes two parameters to its constructor .

  12. 每个Worker对象都为其构造函数获取了一个单一字符串。

    Each Worker object takes a single string for its constructor .

  13. 请使用基于整数或String的构造函数。

    Instead , use the integer or String-based constructors .

  14. 这种风格的构造函数并不常见,它返回一个称作self的值。

    This particular style of constructor is unusual in that it returns a value called self .

  15. 如果类X没有用户声明的构造函数,则一个构造函数将会被隐式声明。

    If there is no user-declared constructor for class X , a default constructor is implicitly declared .

  16. 用file构造函数或open方法创建file对象,open是file构造函数的别名。

    You create a file object using the file constructor or the open method , which is an alias for the file constructor .

  17. 与向对象构造函数中添加方法比起来,我更喜欢使用prototype关键字。

    Rather than adding methods to the object constructor , I prefer to use the prototype keyword .

  18. 您启动类时,构造函数会加载您的Facebook插件。

    When you initiate the class , the constructor loads your Facebook plug-in .

  19. 对象的构造函数和render方法看上去是这样的

    The object 's constructor and its render method look like this

  20. Date中不赞成使用的构造函数的数量严重限制了您创建此类对象的途径。

    The number of deprecated constructors in Date severely restrict the number of ways you can create such an object .

  21. 因此,使用构造函数及方括号简化符号,可以创建list。

    Thus , you can create a list using a constructor , in addition to the shorthand notation of using the square brackets .

  22. 在内部,Scope依赖线程静态字段存储提供给Scope构造函数的实例的Stack。

    Internally , Scope relies on a thread-static field to store the Stack of instances supplied to Scope 's constructor .

  23. 我们没有在它的构造函数中指定Scale窗口小部件的回调,而是稍后使用configure来指定。

    We specify the callback for the Scale widget not in its constructor , but later , using the configure function .

  24. 并且这个例子与前例类似,唯一不同之处是我在这里将Date对象直接传递给构造函数

    And this example is similar to the preceding one except that this time I pass the Date object directly to the constructor

  25. 如果你没有为拷贝构造函数写正确的代码,就有可能造成list中对象的某些数据成员没有初始化。

    If you do not write a correct code for the copy constructor , object within a list will have some data members uninitialized .

  26. 类X的默认构造函数是指可以被无参数调用的X的构造函数。

    A default constructor for a class X is a constructor of class X that can be called without an argument .

  27. 采用这种范围的对象每次都通过自己的对象构造函数来创建,并由Java垃圾收集器释放。

    Objects tagged this way are created through their own object constructors every time and are released by the Java garbage collector .

  28. 当Springbean拥有单个构造函数时,这个针对SCA的特性包目前只支持构造函数注入。

    The feature pack for SCA currently supports only constructor injection when the Spring bean has a single constructor .

  29. 与共享内存对象相似,对于以只读方式打开消息队列,应该把openonly属性传递给构造函数。

    Similar to the case for a shared memory object , a message queue that is opened only for reading will have the open_only attribute passed in the constructor .

  30. @Name注释告知Seam使用默认的类构造函数创建新实例。

    The @ Name annotation tells Seam to use the default constructor of a class to create a new instance .