As you can see, the class methods are simple.
正如您所见,类方法非常简单。
First-class methods and functions (closures)
一流的方法和函数(闭包)
Now it's time to add the class methods that form the DSL.
现在让我们添加形成DSL的类方法。
A way to specify my class methods, which are required for the DSL.
指定我的类方法的方式(DSL需要使用类方法)。
It also hides all base class methods with the same signature.
同时也隐藏具有相同签名的所有基类方法。
With the new collection class methods, this has been simplified to.
如果使用新的集合类方法,上面的代码就被简化为。
In contrast, class methods do not require you to create an instance.
相反,类方法不需要您创建一个示例。
On the other hand, you may want to override certain base-class methods.
另一方面,您也可能想重写某些基类方法。
Listing 4 illustrates using PHP overloading to invoke object and class methods.
清单4展示如何使用php重载调用对象和类方法。
The same concept can be used with functions, or even class methods, as shown below.
这也适用于函数,甚至是类方法,如下所示。
By default, the C++ compiler uses the __thiscall calling convention for class methods.
根据预设,C++编译器使用__thiscall作为类成员函数的调用协定。
The use cases for class methods that return functions is limited only by your creativity.
用于类方法并返回函数的用例仅利用您的创造力进行限定。
For example, you may extend a class to change the behavior of the base-class methods.
例如,您可能会扩充一个类别以变更基底类别方法的行为。
In some situations, you may need to ensure that base-class methods are not overridden.
有些情况下您可能需要确保基底类别方法没有被覆写。
In addition the library provides class methods to create objects of their type in different ways.
另外,这个库还提供以不同方式创建类型的对象的类方法。
This would imply that stored procedures are not similar to class methods since they are not part of tables.
这意味着存储过程不同于类方法,因为它们不是表的一部分。
You need the contents of these text fields and the Formatter class methods to format them, as Listing 2 shows.
您需要这些文本字段的内容和对其进行格式化的Formatter类方法,如 清单 2所示。
Various aspects of building classes such as getter and setters, different property types as well as class methods.
构建类的许多方面,例如getter和setter,不同的属性类型和类方法等都被提及。
UDDI4J v2 has improved the usability of these classes by adding a set of collection class methods to these classes.
UDDI4 J v 2通过向这些类添加一组集合类方法改进了这些类的可用性。
Is it true that the "initialize" message is sent to a class before any other messages, even class methods calls?
(初始化)消息是不是首先被发送到类的消息,甚至比调用类方法更早?
With JSFUnit API, the test class methods can submit data on a form and verify that managed beans are properly updated.
有了JSFUnitAPI,测试类方法可以提交表单数据,并且验证管理的bean是否被正确更新。
Static class methods may support a different level of thread safety than those associated with an instance of that class.
和实例的方法相比,静态类的方法或多或少拥有更高的线程安全性。
I set up the compiler so I have to specify the override annotation so as to clarify which methods are overriding base class methods.
我对编译器进行了设置,所以我必须指定override注释,以便指明哪些方法要覆盖基类的方法。
You can take a similar approach to synchronize the class methods of the associated class, using the class object instead of self.
与此类似,你可以使用类对象为相关类的类方法进行同步保护。
Instead, let's look at four functions that are useful in their own right and demonstrate the utility of the rest of the STR class methods.
现在让我们了解一下四个有用的函数,并演示其他str类方法的工具。
Here I subclass ExprEditor in my own VerboseEditor, overriding three of the base class methods — all named edit , but with different parameter types.
这里我在自己的VerboseEditor中派生了ExprEditor子类,重写了三个基本的类方法——它们的名字都是edit,但是有不同的参数类型。
Since class methods may be overloaded, methods that differ just slightly in their behavior are given identical names and differ only by their prototypes.
因为类方法可能被重载,同名的方法的参数不同可能作用也有些不同。
You can examine the class methods included in the code download for this article to find out more about how each result object value is computed (see Resources).
您可以研究本文的代码下载中包含的类方法,以了解关于如何计算每个结果对象值的更多信息(请参阅参考资料)。
Although identically named class methods and instance methods are represented by the same selector, they can have different parameter types and return types.
尽管同名的类方法和实例方法拥有相同的选择器,但它们可以有不同的参数类型和返回值类型。
Instead, you can pass in the GuiTestObject to the constructor once, and then use the methods to set and get the text as instance methods instead of class methods.
可以将GuiTestObject只传递到构造函数中一次,然后将设置和获取文本的方法用作实例方法,而不是用作类方法。
应用推荐