工厂对象实现取消引用逻辑。
方法是从工厂对象中得到该驱动程序的实例。
You do so by obtaining an instance of the driver from a factory object.
我们同样称呼这个对象为类工厂对象。
DriverManager作为一个工厂对象。
要定义JMS队列连接工厂对象,请执行以下步骤。
这个实体能够是类工厂对象或其它客户端。
This entity can be the class factory object or any other client.
它使用轻量级数据和工厂对象实现对关系数据的快速访问。
It provides rapid access to relational data using lightweight data and factory Java objects.
这样让全局引用计数对类工厂对象的引用计数不再起作用了。
Thus for global reference counting, references to the class factory object should not count.
这个数据成员保存注册类工厂对象时COM返回出来的标识。
This data member saves the identifier that COM returns when registering the class factory object.
返回的对象是类工厂对象,接口id确保调用者“理解”指针。
The object returned is the class factory object, and the interface ID assures the caller that it "understands" the pointer.
但更简洁的方法是“在每位顾客到商店时”,让工厂对象生成所需的顾客对象。
But a more parsimonious approach is to let a factory object generate the needed customer objects "as each customer enters the store."
之后,他向我们展示了如何通过工厂对象来控制并降低应用对DI框架的依赖?
Later, he shows how a hand-rolled Factory-like object might be used to control and reduce the application's dependency on the D.I framework.
但强迫公用api适应工厂对象或抽象工厂(只因为测试代码要求它这样)是错误的设计。
But forcing the public API to accommodate factory objects or abstract factories, just because the test code wants it to, is the wrong design.
对象的代码不再需要了,然而依然存在用COM库函数注册过的类工厂对象。
The object's code is not needed anymore, even if it still has its class factories registered with the COM libraries.
在运行时,工厂对象可以生成连接、定位CICS服务器和激活服务器上的CICS程序。
At run time, a factory object can generate a connection, locate the CICS server, and invoke the CICS program at the server.
核心对象的上一层是工厂代码层。工厂对象提供了核心XPCOM对象的基本抽象。
One layer above the core object is the factory code. The factory object provides a basic abstraction of the core XPCOM object.
如果必须传入抽象工厂对象,那么您必须添加一个新的公用构造函数或赋值(mutator)方法。
If an abstract factory object must be passed in, then you must add a new public constructor or mutator.
这个工厂对象创建的DirContext对象能够制定ApacheDS可以理解的LDAP请求。
This factory object creates a DirContext object capable of authoring LDAP requests that ApacheDS can understand.
记住客户端传递一个接口id到类工厂对象里,在对象内部我们审核它是不是我们类工厂的接口。
Remember that the client passed an interface id to the class factory object, and in the object we validated whether it was our class factory interface.
实际上,许多人已经用工厂对象来着手这种方法,而不是用工厂方法—我们以前是这样做的,但很快就放弃了。
In fact, many would have started this approach with a factory object, rather than a factory method — we did, but soon backed away.
这是个简单、效的对象-关系映射工具。它使用轻量级数据和工厂对象实现对关系数据的快速访问。
Cartographer is a simple, efficient object relational mapper engine. It provides rapid access to relational data using lightweight data and factory Java objects.
您可能会说InitialDirContext对象是由工厂对象实例化的DirContext对象的包装器。
You might say that the InitialDirContext object is a wrapper for the DirContext object instantiated by a factory object.
此时,您可能很想更进一步并用成熟的抽象工厂对象替换工厂方法,如ErichGamma等人在设计模式中详细描述的那样。
At this point, you may be tempted to go one step further and replace the factory method with a full-fledged abstract factory object, as detailed in Design Patterns by Erich Gamma, et al.
获得工厂对象后,您就能够创建OmniFindApplicationInfo对象,它将控制该应用程序能够搜索的集合。
Once you have the factory object, you can create an OmniFind application Info object which will control which collections this application will be able to search.
这个ProtocolCodecFactory是一个工厂对象,ApacheDS框架用它创建特定于LDAP的编码和解码对象。
This ProtocolCodecFactory is a factory object that the ApacheDS framework USES to create LDAP-specific encoding and decoding objects.
要想进一步增强面向对象特性,可以将if语句的最后一小部分替换为Map,后者将EventType连接到EventHandler工厂对象。
It would be even more object oriented if you replaced the last bits of the if statement with a Map connecting EventTypes to EventHandler factory objects.
例如,清单1使用了来自Sun Microsystem 的 com.sun.jndi.ldap.LdapCtxFactory工厂对象。
For example, Listing 1 employs a com.sun.jndi.ldap.LdapCtxFactory factory object from Sun Microsystems.
这就是依赖注入容器责无旁贷的,它是一个智能的对象工厂。
That’s where the Dependency Injection container comes in. It is a smart object factory.
我们的对象工厂相当简单。
基于上述原因,如果得到了多于一个的工厂类对象,即使每个工厂类对象都被正确创建,依然会得到两个被创建类对象。
If you accidentally have more than one factory object for one of the reasons above, you will still have two of the created objects, even if each factory object is built correctly.
应用推荐