横切变得很明确,易于推理和修改。
Crosscutting becomes explicit, easy to reason about and change.
横切是面向方面编程的专有名词。
Crosscutting is a term specific to aspect-oriented programming.
所有这些都是所谓横切关注点的例子。
那么它们是否也适用于横切关注点呢?
Are they also appropriate for dealing with crosscutting concerns?
针对:横切功能和规范。
针对:横切规范和功能。
方面可以并且通常用普通对象实现横切行为。
Aspects can and often do implement their crosscutting behavior using ordinary objects.
方面的关注点是横切。
不需要横切领域对象。
因此,怎样才能实现一个横切关注点,例如日志?
So how do we implement a cross-cutting concern such as logging?
它为在系统中详细指定并封装横切点提供了方法。
It provides a way of specifying and encapsulating cross-cutting concerns in a system.
现在,我将展示以横切方式提供注释的基本语法。
For now, I'll show you the basic syntax to supply annotation in a crosscutting manner.
横切数个类的行为给集成测试带来了一个特定问题。
Behavior that crosscuts a number of classes poses a particular problem for integration tests.
AOP是在应用程序开发中管理横切关注点的关键。
AOP is key to managing crosscutting concerns in application development.
避免将所有代码与横切关注点类的特殊实例联系起来。
Avoided tying all code to particular instances of cross-cutting concern classes.
注意在撰写本文时,只有AJDT提供横切比较工具。
Note that as of this writing, only AJDT provides a crosscutting comparison tool.
请参阅参考资料来了解关于动态横切的更多内容。
通过划分Aspect代码,横切关系变得容易处理。
By compartmentalizing aspect code, crosscutting concerns become easy to deal with.
实际上,横切关注点代码的注入,就是一种类型的模式。
In fact, the injection of code for crosscutting concerns is a pattern of sorts.
通过只显示改变,横切比较工具可以帮助防止信息盲点。
By only showing the changes, the crosscutting comparison tool can help prevent information blindness.
回到AT M的例子,横切功能检查调用者的安全凭证。
To return to the ATM example, the crosscutting functionality checks the caller's security credentials.
在横切的世界里,横切有两种类型:动态横切和静态横切。
Within the world of crosscutting, there are two types: dynamic crosscutting and static crosscutting.
这使它特别容易采用,而且对于一些粗粒度的横切很有用。
This makes it particularly easy to adopt and useful for coarse-grained crosscutting.
在本文中,我将介绍测试用方面实现的横切行为的一组技术。
In this article, I introduce a catalog of techniques for testing crosscutting behavior implemented with aspects.
可以利用这种关注点的分离分别测试横切规范及它们的行为。
You can leverage this separation of concerns to test their behavior separately from the crosscutting specification.
在本文剩下的篇幅中,我将重点讲解静态横切的技术和应用。
For the remainder of the article I will focus on the technique and application of static crosscutting.
此外,静态横切可以把扩展和实现附加到对象的基本结构中。
Moreover, static crosscutting lets you affix extensions and implementations to the fundamental structure of an object.
概念上,这种结构可以以横切的方式在程序元素上附加注释。
Conceptually, such a construct allows you to attach annotations to program elements in a crosscutting manner.
不过,它可帮助您理解并获得对应用程序的横切关注点的信任。
However, it will help you to understand and gain confidence in your application's crosscutting concerns.
AOP模块化了横切关注点,因此我要在代码中寻找横切关注点。
AOP modularizes crosscutting concerns, so I should look for crosscutting concerns in my code.
应用推荐