青年中文青年中文

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.