In that case, a new singleton object will be created.
在这种情况下,一个新的单例对象会被创建。
First, XML is a Scala object. That is, it is a singleton object.
首先,XML是一个Scala对象,即它是一个单例(singleton)对象。
How to run test cases for Singleton object with multiple state?
如何运行多个状态对象的测试用例?
As a result, instance is now non-null and refers to a valid Singleton object.
结果是,instance现在为非null并引用一个有效的Singleton对象。
The design of this class ensures that only one Singleton object is ever created.
此类的设计确保只创建一个Singleton对象。
All calls to a singleton object are handled by one instance of that object.
所有对单一物件的呼叫都是由该物件的一个执行个体所处理。
Lines CA and D0 represent the inline constructor storing the values true and 5 into the Singleton object.
CA和d0行表示内联的构造函数,该构造函数将值true和5存储到Singleton对象。
This line of code creates a Singleton object and initializes the variable instance to refer to this object.
此行代码创建了一个Singleton对象并初始化变量instance来引用此对象。
When the first thread exits the synchronized block, the waiting thread enters and creates another Singleton object.
当第一个线程退出synchronized块时,等待着的线程进入并创建另一个Singleton对象。
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中。
This line is supposed to ensure that instance will only ever be null or refer to a fully constructed Singleton object.
此行应该确保instance只为null或引用一个构造完整的Singleton对象。
Thread 1 completes the initialization of the Singleton object by running its constructor and returns a reference to it.
线程1通过运行Singleton对象的构造函数并将引用返回给它,来完成对该对象的初始化。
Because it is not, thread 2 returns the instance reference to a fully constructed, but partially initialized, Singleton object.
因为实例不为null,线程2将instance引用返回给一个构造完整但部分初始化了的Singleton对象。
Instead, Scala supports a singleton object construct to support those cases where exactly one instance of a type is needed.
相反,Scala支持单例模式,可以应用于那些一种类型只有一个实例的情况。
Now, we can call the reset method to start off each test run to ensure we are going through the initialization code for the singleton object on every test run.
现在,我们可以在每次测试之前调用reset方法,保证我们在每次测试过程中都会先执行singleton对象的初始化代码。
To wit, compiler optimizations can make the assignment of the new singleton object before all its fields are initialized. (See "Double-checked locking is broken" in Resources.)
为了更加智能化,编译器优化会在单例对象所有域完全初始化前就创建该单例对象(参见《重复检查锁的致命点》)。
This class provides a set of classes, or a set of singleton object instances, that include all of the root-level resources and providers (classes annotated with @Provider) in a JAX-RS application.
此类提供了一组类或一组单例(singleton)对象实例,在一个 JAX-RS 应用程序内包括所有的根级别的资源和提供程序(由 @Provider注释的类)。
The instance fields of the singleton will not be globally unique. Because several VMs are involved for what appears to be the same object, several singleton objects might be brought into existence.
原因在于多个虚拟机都可以涉及到相同的单实例类,这些单实例对象可能会同时存在于上下文中,从而导致这些单实例对象并不是全局唯一的。
Singleton — returns reference to the single instance of the delegate object.
Singleton——返回对委托对象单个实例的引用。
Singleton is the default and most often used object mode.
Singleton是默认的也是最常用的对象模型。
In the constructor of StockQuoteGenerator class, which is a singleton class, we are starting a new thread and assigning a Runnable object to that thread.
在stockquotegenerator类(一个单态类)的构造函数中,我们启动了一个新线程,并向该线程分配了一个Runnable对象。
You will design the object as a singleton (this design pattern will limit this object to a single instance) and have the appropriate retrieve and store methods to manipulate the cache.
您将把对象设计为一个单子实例 (singleton)(这个设计模式将把这个对象限制在一个单个实例中)并使用合适的检索和存储方法对高速缓存进行操作。
Instead you can define some as an object (instead of a class) and it becomes a singleton instance of the class.
相反您可以定义一个对象(而不是类)并且它将成为类的一个单例实例。
This singleton is the root management object that starts and stops all other management tasks.
这个单实例对象是根用户管理对象,启动和停止所有其他管理任务。
Both UI components and the Application object (which is a singleton) can receive system events.
UI组件和应用对象(这是一个单例)都能收到系统事件。
With all those mechanisms, a reconstituted object loses its referential identity, and you have to consider carefully whether your singleton is still a singleton.
使用这些序列化机制时,被重建的对象将失去原对象的相关标识,所有必须特别注意单例对象是否依然是单例的。
In order to reduce memory usage, the resource bundle object is static and singleton.
为了减少内存使用,资源对象是静态和单一的。
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 进行聚集计算时需要的数据存储在另外的对象当中的方式。
The singleton pattern can be used to delay the initialization of an object as long as possible.
单元素模式可以用来尽可能久地延迟对象的初始化。
The API is straightforward: You call a singleton method and get back a connection object.
API很直观:您调用单个方法,并返回一个连接对象。
应用推荐