• The Singleton creation pattern is a common programming idiom.

    单例创建模式是一个通用的编程习语。

    youdao

  • Create a private attribute for the Singleton Pattern called _instance.

    为Singleton模式创建私有属性,称为_ instance。

    youdao

  • Doing so creates an instance of the Singleton Pattern in the Model Explorer.

    执行此操作将会在模型浏览器中生成一个Singleton模式的实例。

    youdao

  • This is important because the singleton aspects are typically not garbage collected.

    这一点很重要,因为单体的方面通常不会被垃圾收集。

    youdao

  • Being close to wild roses in appearance, the singleton fits the unfussy modern garden.

    这种样子和野生蔷薇差不多的品种可以种植在那些不是很讲究的现代花园。

    youdao

  • The singleton pattern can be used to delay the initialization of an object as long as possible.

    单元素模式可以用来尽可能久地延迟对象的初始化。

    youdao

  • When copies of the singleton class run in multiple VMs, an instance is created for each machine.

    当单例类的副本运行于多个虚拟机中时,每个虚拟机都会为其创建一个实例对象。

    youdao

  • The constructor of BookWebApp gets the singleton instance of the book service implementation object.

    BookWebApp的构造函数获取这个图书服务实现对象的singleton实例。

    youdao

  • To create an instance of the Factory Method Pattern, perform the same steps as for the Singleton Pattern.

    要创建Factory方法模式的实例,执行同Singleton模式相同的步骤。

    youdao

  • Drag and drop the Singleton Pattern instance from the Pattern Explorer into the UML Class Diagram view.

    将Singleton模式实例从模式浏览器中拖拽到UM l类图视图中。

    youdao

  • Lines CA and D0 represent the inline constructor storing the values true and 5 into the Singleton object.

    CA和d0行表示内联的构造函数,该构造函数将值true和5存储到Singleton对象。

    youdao

  • The major disadvantage of using a Singleton, as we did here, is that you must clear the Singleton between each test.

    正如我们在此所做的,使用Singleton的主要缺点是:您必须在各次测试之间清除Singleton。

    youdao

  • As its name suggests, the Singleton Pattern is typically used when you want only one instance of a particular class.

    如其名称所暗示的,当您想要特别类的仅仅一个实例时,才使用Singleton模式。

    youdao

  • The code at BE allocates the memory from the heap for the Singleton object and stores a pointer to that memory in eax.

    be处的代码为Singleton对象从堆中分配内存,并将一个指向该块内存的指针存储到eax中。

    youdao

  • Listing 4 shows a version of the singleton that USES a method instead of an attribute to specify the appropriate class.

    清单4显示了使用方法而非属性来指定适当类的单例。

    youdao

  • Thread 1 completes the initialization of the Singleton object by running its constructor and returns a reference to it.

    线程1通过运行Singleton对象的构造函数并将引用返回给它,来完成对该对象的初始化。

    youdao

  • Having this method available can be helpful in the application in general because now the singleton becomes easily mutable.

    总之,在应用程序中增加这个方法是很有用的,因为我们现在可以轻松地修改单一实例。

    youdao

  • To facilitate this, the plug-in class implements the singleton pattern: It stores a reference to itself in a private class variable.

    为了使这一点更方便,插件类实现单模式(singletonpattern):它在私有类变量中存储一个自身的引用。

    youdao

  • The singleton provides us with the means to store another object that is used for the aggregation done in each UDF in the SQL statement.

    单件为我们提供了一种可以将SQL 语句中每一个UDF 进行聚集计算时需要的数据存储在另外的对象当中的方式。

    youdao

  • Most caches are implemented using the Singleton pattern involving a static reference to a top level cache class as shown in this example.

    使用Singleton模式实现的大多数缓存都涉及本例所示的对顶级cache类的静态引用。

    youdao

  • The problem with this line of code is that the variable instance can become non-null before the body of the Singleton constructor executes.

    这行代码的问题是:在Singleton构造函数体执行之前,变量instance可能成为非null的。

    youdao

  • The singleton, builder, and factory method design patterns are considered creational patterns, as they assist in the construction of objects.

    单例、生成器和工厂方法设计模式被视为是创建型的模式,因它们可协助对象的构建。

    youdao

  • The only other method (set in italics) in the class is used to get a reference to the singleton and to create it if it is not yet instantiated.

    该类中仅剩的另一个方法(用斜体标识)用于获取该单件的一个引用,如果尚未实例化则创建它。

    youdao

  • A simple optimization to this code would be to apply the Singleton design pattern to class Empty, because every instance of Empty is identical.

    这段代码的一个简单优化是对empty类应用同一个设计类型,因为每一个Empty的实例都是同样的。

    youdao

  • If you add database connections or use a JDBC driver that allows multithreading, the singleton can be easily adjusted to allow more connections.

    当你增加数据库连接或者改而使用支持多线程的JDBC驱动器时,单例模式能够很容易地适应这一变化。

    youdao

  • The singleton pattern is probably one of the most often used OOP design patterns; it restricts the number of object instances of a class to one.

    单例模式可能是最常用的OOP设计模式之一了;它限制了一个类的对象实例数只能为1。

    youdao

  • Then it shows how PHP V5.3's LSB feature resolves those issues, while showing implementations of the singleton and active record design patterns.

    然后展示了PHPV5.3的LSB特性,并给出了单例和活动记录设计模式。

    youdao

  • As I discuss the singleton, keep the above implementations in mind, although many of those phenomena can occur for any implementation of the singleton.

    本文讨论的主题是单例模式,请将上述实现方式牢记于心,因为接下来的现象可能出现在任何一种实现方式中。

    youdao

  • The Singleton session bean lives for the duration of the container in which it is created but state does not survive a shut-down or a crash of the JVM.

    单例sessionbean的生命周期与创建它的容器保持一致,但是其状态会因为JVM的停止或崩溃而丧失。

    youdao

  • Users of the class can then add and remove Attendee elements from the collection the Singleton instance holds, or replace the elements in the collection.

    然后,该类的用户可以在Singleton实例保存的集合中添加和删除Attendee元素,或替换集合中的元素。

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定