Using static methods in custom code.
使用定制代码中的静态方法。
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.
修饰符的一种常见用法是注释静态方法。
Use the static methods in the class and you’re ready to go.
你只需使用类中的静态方法就可以完成想要的功能。
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.
闭包可以通过接口传递给静态方法和构造函数。
Static methods can also create the buffers, because no constructors exist.
静态方法也可以创建缓冲区,因为不存在构造函数。
Static methods are also provided to retrieve parameter objects by their name.
还提供静态方法以通过参数对象的名称来检索参数对象。
A metadata helper class (static methods in Microsoft.Cci.MetadataHelper.dll).
一个元数据辅助类(Microsoft . Cci .MetadataHelper . dll中的静态方法)。
The same prefix can reference several different static methods in the same class.
在同一个类中,相同的前缀可以引用多个不同的静态方法。
Tests on static methods also are not supported because they don't affect object state.
对静态方法的测试也不支持,因为它们不影响对象的状态。
The use of static methods might be considered a bad object oriented programming practice.
静态方法的使用可能是一种糟糕的面向对象的编程操作。
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实例。
Also, all the generated interfaces have a factory class that contains static methods such as.
此外,所有生成的接口都有一个包含静态方法的工厂类,比如。
XT allows callbacks to static methods of any class in the classpath at the time of XSL processing.
XT允许回调在XSL处理期间访问处于classpath中的任何类的静态方法。
You can also search through the PDOM using the static methods provided in the DOMSearchUtil class.
也可以使用在domsearchutil类中提供的静态方法来搜索PDOM。
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.
要调用其他类中的静态方法,可将完全限定名称映射到另外一个前缀。
Try not to lump diverse functionality into a class by creating a dumping ground for unrelated static methods.
不要尝试为不相关的静态方法创建一个转储平台,来将各种不同的功能组合到一个类中。
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.
另外,如果有人扩展类,因为无法正确覆盖这些方法,静态方法可能会引发问题。
Static methods cannot be overridden but can be hidden if they are not final (Read about Overriding vs Hiding here).
静态方法不能被覆盖,但如果它不是决定性的则可以被隐藏。
To change the behavior of the Factory class, you simply subclass FactoryImpl and override its non-static methods.
要更改Factory类的行为,只要子类化Factory Impl并覆盖其非静态方法。
We'll create the MeasurementManager class with some static methods for getting and returning reusable Measurement instances.
我们将创建measurementmanager类,它带有一些静态方法,用于获取和返回可重用的Measurement实例。
应用推荐