In this article, you have seen how to create schemas that use inheritance, encapsulation and polymorphism, and even had a glimpse of emerging design patterns in XML schema design.
在本文中,您已经看到如何创建使用继承、封装和多态性的模式,并且还大致了解了XML模式设计中新兴的设计模式。
You can use inheritance by defining a skeleton, or base, document with block tags.
我们可以通过使用块标记定义骨干文档或基础文档来使用继承。
We can also use encapsulation and inheritance to add new behavior to existing pages and components.
我们还可以使用封装和继承给现有页面和组件添加新的行为。
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.
这还不利于域类的设计,因为这个实用类现在必须位于对象层次结构的顶层,不允许您使用继承来整合常见行为。
Most AOP practitioners are currently implementing transactional and authorization concerns with existing AOP support, typically through the use of design patterns utilizing aspect inheritance.
大多数AOP实践者目前用现有的AOP支持实现事务和授权功能,通常是通过使用方面继承的设计模式。
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建模面板提供的一般化关系,它是从继承类到基础类而绘制出来的。
If the relationship between the two classes were one of reference rather than of inheritance, then the error would be thrown on the first active use of a, rather than during the loading of a.
如果两个类之间的关系是引用关系而不是继承关系,那么会在第一次使用a时抛出错误,而不是在装入a时抛出。
A common misunderstanding is that composition doesn't use inheritance at all.
一个常见的误解是组合完全不会使用到继承。
To reuse object-oriented code, you extract the target code into another class, then use inheritance to access it.
要重用面向对象的代码,您要将目标代码提取(extract)到另一个类中,然后再用继承来访问它。
Object classes use inheritance, which means LDAP defines base classes to hold commonly used attributes. Child classes then extend the base classes to use the attributes defined therein.
对象类使用继承特性,这意味着LDAP定义了基类来保存常用属性。
A ValidationRule can use inheritance or delegation chaining.
ValidationRule可以使用继承或委托链接。
Go encourages the use of composition and delegation over inheritance, and offers some syntactic sugar to make it more bearable.
相较于继承,Go鼓励使用组合和委派,并为此提供了相应的语法甜点使其更容易接受。
The medium told her the that only way to calm the vengeful spirits was to use her $20 million inheritance to build a home that would confuse the apparitions.
“占星者”告诉她,为了平息这些复仇亡魂的愤怒,唯一的途径就是用她的2000万美金遗产建一座房子,以迷惑幽灵。
You can use programming idioms (such as inheritance) and customization hooks (such as Visual Basic scripts) to write new code extending the application.
可以用编程方案(例如继承)和定制挂钩(例如Visualbasic脚本)编写扩展应用程序的新代码。
Inheritance is limited: with ActiveRecord, I'm forced to use a mapping strategy called single table inheritance (see Resources), which is not always optimal.
继承也受到限制:使用ActiveRecord时,我被迫使用单表继承映射策略,而该策略并不总是最佳选择。
As I've done in previous articles in this series, I'll use the Person class as a starting point for exploring Scala's inheritance system. Listing 1 shows the Person class definition.
与本系列之前的文章类似,我将使用Person类作为起点,探索Scala的继承系统。
Listing 4 shows how you might use the declare parents tag to change Foo's inheritance hierarchy.
清单4显示了用declareparents标签来改变Foo的继承层次。
In Figure 7, almost every relationship is a use apart from the inheritance.
在图7中,几乎所有的关系是use除去继承关系。
Among the three leading contenders in the ease of use category, dom4j differs from the others in using an interface-based approach with multiple layers of inheritance.
就使用方便这一范畴而言,在JDOM、dom4j和electric XML这三个主要竞争者中,dom 4 j与其它两个的区别在于它使用带有多个继承层的基于接口的方法。
As it is clearly no inheritance for you then, I have thought it best to use for your advantage, almost the only fragment of the old connexion that stands by me, through long habit.
很明显,那时候我将没有什么遗产留给你,因此我想,为了你的利益,最好利用我通过长期的习惯所保留下来的几乎唯一还存在的一丁点儿老关系。
I can use the same technique to attach my common attributes for content management instead of inheritance.
我可以使用相同的技术(而非继承)附加通用属性用于内容管理。
DO make good use of CSS inheritance.
DO -充分利用CSS的继承性。
The use of trusts and companies offshore can minimise some taxes—such as inheritance tax—and defer others, such as income tax, until the money is brought home.
利用信托公司和成立离岸企业可以最大限度的躲避一些税收,比如遗产税,还可以将一些税务的支付的时间推迟到这些资金重新回到母国为止,例如所得税。
Most of them use composition with interface inheritance.
这些都使用了通过实现接口来使用组合。
Can you explain what inheritance is and an example of when you might use it?
你能解释一下什么是继承和何时可以使用它的例子?
Since Domain components are represented by interfaces and not by classes, you can use multiple inheritance to combine several previously defined components into a new one.
由于域组件是通过接口展现而不是通过类,你可以用多继承来组合几个之前定义的组件成一个新的组件。
In order to make styles clean and predictable we need to use composition rather than inheritance.
为了使样式更干净而且更有可预测性,我们要多使用组合而不是继承。
Keeping up with your indexes, using eager loading with include, and using polymorphic associations in places instead of inheritance are just three ways you can use to improve your code base.
保留索引、借助include使用热加载和在某些地方使用多态关联代替继承是三种可用来改进代码库的方法。
Keeping up with your indexes, using eager loading with include, and using polymorphic associations in places instead of inheritance are just three ways you can use to improve your code base.
保留索引、借助include使用热加载和在某些地方使用多态关联代替继承是三种可用来改进代码库的方法。
应用推荐