Using static methods in custom code.
使用定制代码中的静态方法。
How to effectively use static methods?
如何有效地使用静态方法?
It should not be used where static methods would suffice.
在静态方法足可以满足需要的情况下,不应当使用它。
Categories are regular classes containing static methods.
categories是一个常规类,包含静态方法。
A common use for decorators is to annotate static methods.
修饰符的一种常见用法是注释静态方法。
Scala does not have static methods, fields, or initializers.
Scala没有静态的方法、字段和初始化程序。
The syntax for declaring and accessing static methods is similar.
声明和访问静态方法的语法与此相似。
Closures can be passed as interface to static methods, constructors.
闭包可以通过接口传递给静态方法和构造函数。
A metadata helper class (static methods in Microsoft.Cci.MetadataHelper.dll).
一个元数据辅助类(Microsoft . Cci .MetadataHelper . dll中的静态方法)。
Tests on static methods also are not supported because they don't affect object state.
对静态方法的测试也不支持,因为它们不影响对象的状态。
You can access methods on singleton objects similar to how you would call static methods.
您可以像调用静态方法一样访问单例对象的方法。
The RepositoryWrapper class has two static methods that return the managed bean instance.
Repository wrapper类有两个静态方法,可以返回受管bean实例。
XT allows callbacks to static methods of any class in the classpath at the time of XSL processing.
XT允许回调在XSL处理期间访问处于classpath中的任何类的静态方法。
The SWTHelper class has static methods that help identify the specific view instance you work with.
SWTHelper类拥有一些静态方法,可帮助您识别所处理的特定视图实例。
The static methods in the Factory class will then call the instance methods of your factory instance.
然后,Factory类中的静态方法会调用您工厂实例的实例方法。
Other static methods are provided that allow user classes to easily retrieve objects from the TreeMap.
提供了其它静态方法以允许用户类方便地从TreeMap检索对象。
The first part defines a couple of static methods which are general access methods to handle the cache.
第一部分定义了两个静态方法,它们是处理缓存的一般访问方法。
To invoke static methods in different classes, map each fully qualified class name to a different prefix.
要调用其他类中的静态方法,可将完全限定名称映射到另外一个前缀。
This meant that it lacked many things .NET developers take for granted such as constructors and static methods.
这意味着其中缺少很多.NET开发者认为应该有的内容,像构造函数以及静态方法等。
Also, static methods can cause problems if people extend your classes because they can't be overridden properly.
另外,如果有人扩展类,因为无法正确覆盖这些方法,静态方法可能会引发问题。
You can either initialize them through System.setProperty calls or through some handy static methods on the XMLUnit core class.
您可以通过 System.setProperty调用实例化它们,也可以通过XMLUnit核心类上的一些方便的static方法对它们进行实例化。
An application class can extend this class directly or can use one of the static methods to create an instance using a ResponseBuilder.
应用中的类可以直接继承Response类,也可以使用其静态方法来通过ResponseBuilder创建实例。
With some implementations of the singleton, you allow writers of subclasses to override methods polymorphically, something not possible with static methods.
最后,在单例模式的一些实现方式中,单例类的子类能够动态地重载方法,这是静态方法所不能办到的。
It would be much better to simply prevent the programmer from referring to generic types in static fields, as is done in the case of static methods and classes.
象对静态方法和类所做的那样,只要防止程序员在静态字段中引用泛型类型,情况就会好很多。
part is optional because static methods are invoked without the need for an object reference. Again, it's easiest to see this illustrated by example, in Listing 11
部分是可选的,因为静态方法被调用时不需要对象引用。
If you look at the code, this is made up entirely of static methods, so it could have also been written as a series of functions without changing the extension's behavior.
如果仔细看一下此代码,就会发现这完全由静态方法组成,所以它也可以在无需更改扩展行为的情况下作为一系列函数编写。
Support for importing constants: This facility allows static methods and fields to be imported, avoiding the need to use fully qualified class names when accessing static members.
支持导入常量:这个特性使静态方法和字段能够被导入,这样在访问静态成员时就不必使用完全限定的类名。
Referring to enclosing type parameters inside static methods and static inner classes is prohibited outright by the compiler. So, for instance, the following code is illegal in tiger.
编译器完全禁止在静态方法和静态内部类中引用封闭类型参数。
The static methods of Seam.Component provide access to remote Seam components, while the static Seam.Remoting methods are used to control the remoting Settings and to create custom data types.
Component的静态方法提供了对远端Seam组件的访问,而静态Seam .remoting方法则用来控制remoting设置并创建定制数据类型。
For bindings that work with interfaces or unmodifiable classes, JiBX instead adds the necessary marshalling/unmarshalling code to a special helper class (called the "munge" class) as static methods.
如果绑定要处理接口或不可修改的类,JiBX 转而把必要的编排/反编排代码以static 方法的形式,添加到特殊的助手类(叫作“munge”类)。
应用推荐