清单2:在方法参数中使用工厂方法。
为了实现该目的,能够使用工厂模式。
Seam使用工厂模式初始化非组件对象和集合。
Seam USES the factory pattern to initialize non-component objects and collections.
使用工厂方法设计模式的正确方法是什么?
What's the right way to use the Factory method design pattern?
但是使用工厂是为了创建解析器而不是直接解析文档。
However, you use the factory to create parsers, not to parse documents directly.
制造商必因使用工厂、材料、人力而付费。
The manufacturer must assemble, pay for, and put to use plant, materials, and labor.
针对这类问题的一种面向对象式解决方案是使用工厂类。
The object-oriented solution to such a problem is the factory class.
然后再使用工厂方法模式,这样耦合度就与界面相关联了。
Then, I use the factory method pattern so that the coupling is with the interface.
颁布并督导员工正确合理安全使用工厂基础设施及网络设施。
Research on the Property Right of Network Infrastructure Based on Theory of Public Goods;
我们使用工厂模式(见附注)为某个绑定类型创建窗体并产生绑定详细信息。
We used the factory pattern (see sidebar) for creating and populating binding details for a specific binding type.
对各个复合文件工件进行检查,然后使用工厂方法在内存中实例化不同对象。
The various composite file artifacts are inspected, and factory methods help instantiate the various objects in memory.
您可以在应用程序需要创建其类型依赖于子类的实现的对象时,使用工厂方法模式。
You use the factory method pattern when an application needs to create objects whose type depend on the implementation of subclasses.
从数据库中装入人员的任何新实现都不要求在使用工厂和接口的类中进行任何更改。
Any new implementation for loading people from a store does not require any changes in the class that USES the factory and interface.
请求程序使用工厂的一个实例去生成存根的一个实例,然后存根再与提供程序交互。
The requestor uses an instance of the factory to produce an instance of the stub, and the stub to interact with the provider.
制造商必须因使用工厂、材料、人力而付费,只有这样才能生产出销售的产品。
The manufacturer must assemble, pay for , and put to use plant, materials, and labor, before he can produce a salable product .
JAXB使用工厂来构造对象类的新实例,而Zeus通过原型使用生成的实现类。
Whereas JAXB USES a factory to construct new instances of an object class, Zeus USES a generated implementation class with prototyping.
为了维持生产线的运转,他们必须轮班工作12个小时,这使得他们几乎没有时间来使用工厂的便利设施。
To keep the production line running, they have to work 12-hour shifts, leaving hardly any time to use amenities at the plant.
在这个例子中,应用程序通过使用工厂(factory)创建SOAPConnection对象。
In this case, the application creates the SOAPConnection object using a factory.
若要创建已注册类型的多个实例,请使用工厂模式创建一个对象管理器,该对象管理器将向应用程序注册并管理多个实例。
To create multiple instances of a registered type, use the factory pattern to create an object manager that is registered with the application and then manages the multiple instances.
为了通过这种API得到解析器,首先需要取得相应的解析器工厂,比如SAXParserFactory,然后再使用工厂创建解析器。
To obtain a parser with this API, you first need to retrieve a corresponding parser factory — such as a SAXParserFactory — and use it to create the parser.
为了通过这种API得到解析器,首先需要取得相应的解析器工厂,比如SAXParserFactory,然后再使用工厂创建解析器。
To obtain a parser with this API, you first need to retrieve a corresponding parser factory — such as a SAXParserFactory — and use it to create the parser.
应用推荐