Favor object composition over class inheritance.
优先使用对象组合,而非继承。
Interfaces are useful when you cannot use class inheritance.
在无法使用类别继承的情况下,介面是相当有用的。
In each AU, basic components could be conveniently found out by Class Inheritance method.
在每个装配单元中,采用类继承的方法,可以方便地查询到该单元最基本的组成体素。
A publishing books and tape distribution, design and management of publications using class inheritance.
某出版系统发行图书和磁带,利用继承设计管理出版物的类。
Gets the name of the management class in which the method was first introduced in the class inheritance hierarchy.
获取管理类的名称,在该类中第一次将该方法引入到类的继承层次结构。
The hierarchical class diagram demonstrates a way to discover an entire class inheritance relationship within a project or a work set.
层级类图代表着一种方式,该方式能发现在一个项目或工作集中,发现整个类间的层次关系。
A mechanism for treating different implementations as logically "the same kind of thing" - usually polymorphism is implemented via interface implementation and class inheritance.
l一种逻辑上做相同事情,但却有不同实现的机制。我们通常称之为多态机制。
Other languages would have to resort to Inheritance for this, ie. define the method in a class and force users to extend that.
其他编程语言可能要使用继承才能做到:比如在类中定义方法并强迫用户扩展这个方法。
As with traditional inheritance languages, an object need not utilize the same class for every method it calls.
与传统的继承式语言一样,对象不必将同一个类用于它调用的每个方法。
Inheritance allows you to reuse and customize existing code inside a new class.
继承允许您在新的类中重用和自定义现有的代码。
Anyway, this section talks about UML and class diagrams, inheritance, polymorphism, encapsulation... things they should have shown you in the beginning.
总之,该部分讨论了UML和类图、继承、多态性、封装…一些应该在开头为您介绍的东西。
Setting them again for each derived class is a waste, since they would be available anyway by inheritance.
为每个派生类再次设置这些属性是一种浪费,因为通过继承它们就会拥有这些属性。
Either write a separate program to create the tables, or add the necessary functionality in your class with inheritance.
编写一个单独的程序来创建表,或者继承时在类中添加必需的功能。
Discovering the entire inheritance tree structure from an existing system is particularly useful, because it helps you uncover what the top-level class is and what subclasses are in the tree.
从一个已存在系统中发现整个的继承树结构是相当有用的,因为它能向您揭露在树中什么是顶级类以及什么是子类。
Perhaps what we need is a new inheritance phrase, IN-TERMS-OF, to describe the relationship between a trait and an implementing class.
或许我们需要的是一种全新的继承术语,用于描述特征和实现类之间的关系。
Offering both an interface and an abstract class is redundant, but I find it convenient: in most cases, I only need the abstract class, but the interface enables multiple inheritance.
同时提供接口和抽象类是多余的,但我发现这样很方便:在大多数情况下,我只需要抽象类,但接口支持多继承性。
It also hurts the design of your domain classes because this utility class must now sit at the top of your object hierarchy, not allowing you to use inheritance to consolidate common behavior.
这还不利于域类的设计,因为这个实用类现在必须位于对象层次结构的顶层,不允许您使用继承来整合常见行为。
To model inheritance, use the generalization relationship provided by the UML modeling palette, which is drawn from the inherited class to the base class.
要建模继承,可以利用由uml建模面板提供的一般化关系,它是从继承类到基础类而绘制出来的。
Implicit class loading occurs when a class is loaded as result of a reference, instantiation, or inheritance (not via an explicit method call).
隐式类装入发生在由于引用、实例化或继承导致装入类的时候(不是通过显式方法调用)。
There are three fundamental solutions for mapping inheritance into a relational database, and to understand them I will discuss the trade-offs of mapping the class diagram presented in Figure 1.
将继承映射到关系数据库中有三种基本解决办法,为更好地理解它们,我将讨论在图1中显示的映射类图表的优缺点。
It is also important that you understand basic object-oriented paradigms, such as inheritance, class, interface, and so on.
而且,理解基本的面向对象概念(如继承、类、接口等)也很重要。
Inheritance: Annotations — Single table, joined table, and table per class.
继承:标注——单个表、联合表和按类表。
Class abstractions are extended by subclassing and a flexible mixin-based composition mechanism as a clean replacement for multiple inheritance.
Class的抽象可由子类化和一种灵活的基于mixin的组合机制(它可作为多重继承的简单替代方案)来扩展。
For example, a constraint may disallow multiple inheritance, or it may require that a class must have a particular type of attribute. This means that.
例如,一个限制可能不允许多重继承,或者是它可能需要一个类必须具备一个特殊的属性类型。
To reuse object-oriented code, you extract the target code into another class, then use inheritance to access it.
要重用面向对象的代码,您要将目标代码提取(extract)到另一个类中,然后再用继承来访问它。
Identify an inheritance tree UML class diagram.
识别一个uml类图的继承树。
The class API now includes full support for inheritance and superclass method calls. (See Mislav's tutorial for more info.)
类的API目前包含对于继承和超类方法调用的完善支持。
Figure 5 demonstrates the process of generating an inheritance tree class diagram.
图5展示了产生一个继承树类图的过程。
This aids reuse, as it enables other handlers to log without forcing the inheritance of the DebugMediation class.
这有助于重用,允许其他处理程序在不强制继承DebugMediation类的情况下进行记录。
ActiveRecord has a feature called polymorphic associations that is ideal for attaching common behavior to a class without inheritance.
ActiveRecord具有一种称为多态关联的特性,非常适合将通用行为附加给类,完全无需继承。
应用推荐