go top

protected access methods

网络释义

  保护域中的访问方法

规则18:保护域中的访问方法Protected Access Methods) 在基类中将组件参照放置在私有域中,而为这些组件添加一些访问函数来得到他们的属性,这将是一种更好的方法。

基于12个网页-相关网页

有道翻译

protected access 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.

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

    youdao

  • The first and most important addition was access protection for methods and instance variables on classes -- the public, protected, and private keywords.

    第一也是重要新特性针对方法实例变量访问保护 —— publicprotectedprivate 关键字。

    youdao

  • 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 方法访问属性的原因。

    youdao

更多双语例句
$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定