Protected Class methods的意思|示意

美 / / 英 / /

Protected Class方法


Protected Class methods的网络常见释义

受保护的类方法 ... 公开的类方法(Public Class methods) 受保护的类方法(Protected Class methods) 公开的实例方法(Public Instance methods) ...

Protected Class methods相关例句

When fields are declared protected, there is the possibility that methods in subclasses will directly access them, effectively increasing the coupling within a class hierarchy.

将字段声明为受保护时,子类中的方法就有可能直接访问它们,这样就可能有效地增加类层次结构中的耦合。

This approach makes testing protected methods much easier because the test case class can now extend the class that contains the protected methods.

这种方法使得测试受保护的方法非常容易,因为测试案例类现在可以扩展包含受保护方法的类了。

Sometimes you need to write a subclass (often as an inner class) in order to test protected methods.

有时需要编写一个子类(通常作为内部类)来测试 protected 的方法。

That's why the Vehicle class, and its subclasses, have either private or protected fields, and public setter and getter methods to provide access.

这也正是 Vehicle 类及其子类都具有 private 或者 protected 属性,而用 public setter 和 getter 方法来访问属性的原因。

This class contains three protected attributes and six methods, as shown in Listing 1.

此类包含三个受保护的属性和6个方法,如清单1所示。

The actual class that represents an .aspx page in action is an instance of a class that derives from Page; hence, it can call into protected methods.

真正代表一个 .aspx 活动页面的类是从 Page 派生的一个类的实例;因此,它能够调入受保护的方法。