Listing 2: Using factory methods in the method parameter.
清单2:在方法参数中使用工厂方法。
You can instantiate a CipherService directly - no strange or confusing factory methods.
你可以直接实例化一个CipherService-没有奇怪或让人混乱的工厂方法;
The only special part is several convenient static factory methods for manufacturing fields.
唯一的特别之处在于几个方便操纵字段的静态工厂方法。
Creator classes are used to define factory methods that create instances of the product objects.
Creator类用于定义创建产品对象实例的Factory方法。
The various composite file artifacts are inspected, and factory methods help instantiate the various objects in memory.
对各个复合文件工件进行检查,然后使用工厂方法在内存中实例化不同对象。
Using private constructors for factory methods?
使用私有构造函数的工厂方法?
A quotas instance must be given to the dictionary reader factory methods.
必须为字典读取器工厂方法指定配额实例。
This problem could be overcome by allowing static registration of specific factory methods and classes for specific types.
通过允许特定类型的特定factory方法和类的静态注册,可以克服这个问题。
There are three ways for client code to access MXBeans: through factory methods, through the platform server, or as proxies.
客户机代码访问MXBean有三种方式:通过工厂方法、通过平台服务器或作为代理。
In XAML 2009 we see full support for generics, non-default constructors, factory methods, built-in types, and defining new properties.
XAML 2009将完全支持泛型、非默认构造方法、工厂方法、内建类型并且可以定义新的属性。
For those MXBean types where multiple instances of the MXBean may exist, there are factory methods that return the MXBeans in a List, as shown in Listing 2.
对于可能存在多个MXBean实例的那些MXBean类型来说,存在着工厂方法,可以在List中返回MXBean,如清单2所示。
The BOSession class offers static factory methods to create an instance of this class which encapsulates a Notes Session instance used to access the Notes database.
bosession类提供创建该类的实例的静态工厂方法,封装用来访问Notes数据库的NotesSession实例。
The heuristic for identifying static factory methods is somewhat basic and could be confused by a method that looks like a factory method but actually performs a different operation.
用于识别静态factory方法的启发法还比较基本,可能会与看上去像是factory方法但实际上执行不同操作的方法产生混淆。
Note: Yes, these method names are capitalized; if I had to guess, I'd say it's probably because they're factory methods - they instantiate and return Field objects with particular parameters.
注意:是的,这些方法名大写首字母;如果我非得猜的话,我会说它可能是因为他们是工厂方法——它们初始化并返回带特定参数的Field对象。
These are not as common as instance methods, but you will often see class methods that are factory methods for creating new instances of the class; this saves you from having to alloc and initialize.
它们不像实例方法那样常见,但您将会经常看到一些类方法,它们作为创建新的类实例的工厂方法;这免得您必须进行分配和初始化。
These are not as common as instance methods, but you will often see class methods that are factory methods for creating new instances of the class; this saves you from having to alloc and initialize.
它们不像实例方法那样常见,但您将会经常看到一些类方法,它们作为创建新的类实例的工厂方法;这免得您必须进行分配和初始化。
应用推荐