factory method信息详情

factory method发音

意思翻译

工厂方法;工厂模式

相似词语短语

factory───n.工厂;制造厂;代理店

method───n.方法;条理;类函数

factory farming───n.工厂化农场经营;n.工厂化养殖业

transmission factory───变速器厂

factory farms───[农经]工厂化农场(factoryfarm的复数)

factory fresh───工厂新鲜

factory setting───工厂设定;出厂设置

diggers factory───挖掘机厂

factory hands───工人

双语使用场景

Refactoring: Extract and override factory method.───重构:抽取和覆盖工厂方法。

Using a static factory method to create a Msg object.───使用静态工厂方法创建一个msg对象。

From factory method to abstract factory.───从工厂方法到抽象工厂。

The factory method pattern, as its name implies, defines the implementation of a method used to churn out objects.───而工厂方法模式,顾名思义,定义的是一个用来大量产出对象的方法的实现。

Use constructor-arg elements to specify arguments to the factory method, if it takes arguments.───若这个工厂方法需要参数的话,使用constructor-arg元素来指定它的参数。

The class returned by the factory method is an adapter to a particular cloud service.───工厂方法返回的类用于一个特定于服务的适配器。

Before you generate the code and go through it, be aware that you also need to add the appropriate methods for the Factory Method Pattern.───在您生成代码并检查之前,要知道您也需要为Factory方法模式添加适当的方法。

Assure that the factory method is accessible to the target object and its subclasses.───确保目标对象及其子类可以访问工厂方法。

Optional: create a unit test to assure that the original target object's factory method still returns the correct, non-mock object.───可选的:创建单元测试以确保原始目标对象的工厂方法仍返回正确的非模仿对象。

英语使用场景

This factory method is nice since each generated function has it's own space for local variables.

Sometimes, in the case of facilitating polymorphism, a flag will be passed to the factory method to indicate the specific interface implementation or subclass to be returned.