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

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

    youdao

  • The factory method pattern, as its name implies, defines the implementation of a method used to churn out objects.

    工厂方法模式顾名思义定义一个用来大量产出对象的方法实现

    youdao

  • The Factory Method Pattern defines an interface for creating an object, but lets subclasses decide which class to instantiate.

    工厂方法模式定义了一个创建对象的接口,由子类决定实例化的逻辑。

    youdao

  • You use the factory method pattern when an application needs to create objects whose type depend on the implementation of subclasses.

    可以应用程序需要创建类型依赖于子类实现对象使用工厂方法模式

    youdao

  • Patterns (such as the Factory Method mentioned in this article) are an important tool for understanding and discussing object-oriented design.

    模式(本文提到Factory Method模式)理解讨论面向对象设计重要工具

    youdao

  • Create the SecurityManager instance based on the configuration (using Shiro’s Factory concept that represents the Factory Method design pattern).

    根据配置创建SecurityManager实例使用Shiro的工厂概念它表述 工厂方法设计模式);

    youdao

  • Concrete classes provide the appropriate implementation for their respective base class. The Factory Method Pattern consists of the following classes.

    concrete它们各自提供恰当实现

    youdao

  • The Factory Method Pattern is a creational pattern that defines an interface for creating an object but lets subclasses decide which actual class to instantiate.

    Factory方法模式创建的模式,它定义个用来创建对象的接口子类来决定实例化哪个

    youdao

  • Apply the Extract method refactoring to this creation code, creating the factory method (discussed on page 110 of Fowler's book; see the Resources section for more information).

    抽取方法重构应用于这个创建代码创建工厂方法(Fowler书籍第110讨论有关更多信息,请参阅参考资料一节)。

    youdao

  • 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.

    此时可能更进一步并用成熟抽象工厂对象替换工厂方法ErichGamma等人设计模式详细描述的那样。

    youdao

  • Once data is initialized, Seam can place the resulting object into one of the available scopes where it can be read over and over without further participation of the factory method.

    一旦初始数据之后,Seam可以生成对象放到一个可用的作用域中,然后就可以在其中反复读取不再需要借助工厂方法。

    youdao

  • Because we overrode the factory method to write this test, it turns out that we no longer have any test coverage of the original creation code (which is now inside the base class's factory method).

    因为我们覆盖工厂方法编写这个测试所以其结果是:我们测试不再包括任何原始创建代码(现在工厂方法内部)。

    youdao

  • Remember that once these options are set, they affect all instances obtained from the factory after the method invocation.

    请记住一旦设置这些选项调用方法之后它们将影响所有类厂获得实例

    youdao

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

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

    youdao

  • This section offers a step-by-step description of the Extract and Override factory method refactoring.

    循序渐进地描述抽取覆盖工厂方法重构

    youdao

  • The new element creation technique (lines 15-16) differs both by the use of a QName object to represent the element name and by calling a method of the saved factory to build the element.

    通过使用QName对象表示元素名称通过调用已保存工厂方法构建元素可以区别元素的创建技术(第 15-16 行)。

    youdao

  • The solution here is to provide a method parameter with a factory method for the items to read, as shown in Listing 2.

    这里解决方案读取条目提供一个工厂方法的方法参数如清单2

    youdao

  • This is another rather boring line of code: Just call newTransformer() on your factory and supply the method with the XSL stylesheet you want to use. Listing 4 shows you what to do

    另一相当令人厌烦代码工厂调用newTransformer(),方法提供使用XSL样式表

    youdao

  • You can retrieve an MXBean instance from a static factory method that gives you direct access to the locally running JVM's MXBean interface.

    可以静态工厂方法获得MXBean实例,该方法可以使直接访问本地运行JVMMXBean接口

    youdao

  • The @Factory annotation attaches a method to the creation process of an outjected variable, specified in the value of the annotation, when that variable has no value bound to it.

    @Factory注释已提取变量创建过程附加方法是在注释指定的,变量没有绑定任何值时就会使 用该方法。

    youdao

  • The code in Listing 2 takes as input the actual XML instance and USES the parse method of the Factory class of AutomobilePolicyDocument to get an instance of AutomobilePolicyDocument.

    清单2代码接受输入xml实例使用AutomobilePolicyDocumentFactoryparse方法获得AutomobilePolicyDocument实例。

    youdao

  • The example gave a client and server bundle (both in the same VM), and the client found the server via a factory method.

    文中的例子给出了client一个serverbundle两者同一个VM中),client通过工厂方法找到server。

    youdao

  • This can be as simple as invoking the base class's factory method and asserting that the returned object is of the correct type. For example.

    调用工厂方法断言返回对象具有正确类型一样简单

    youdao

  • In this way, the object returned from the static factory method could implement any number of interfaces defined when I create the proxy.

    这种方式静态工厂方法返回对象可以实现建立代理所定义任意数量接口

    youdao

  • This factory method instantiates the collection of course objects by delegating the work to the service layer.

    工厂方法通过将这项工作委托服务来实例化课程对象集合

    youdao

  • The factory implementation produced by the wizard offers a convenient shortcut that allows overriding of the basic factory method so a URL can be passed to the factory when the stub is created.

    向导生成工厂实现提供了一个简化操作就是允许覆写基本工厂方法因此存根创建时URL就可以传递工厂。

    youdao

  • After the new instance is created, the factory provides a method for obtaining a SAX-capable parser.

    实例创建之后工厂提供一种方法用于获得具有SAX功能的解析器。

    youdao

  • After the new instance is created, the factory provides a method for obtaining a SAX-capable parser.

    实例创建之后工厂提供一种方法用于获得具有SAX功能的解析器。

    youdao

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

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

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