不过,以横切的方式提供注释是很有用的。
However, supplying annotations in a crosscutting manner can be very helpful.
请参阅参考资料来了解关于动态横切的更多内容。
在横切的世界里,横切有两种类型:动态横切和静态横切。
Within the world of crosscutting, there are two types: dynamic crosscutting and static crosscutting.
在本文剩下的篇幅中,我将重点讲解静态横切的技术和应用。
For the remainder of the article I will focus on the technique and application of static crosscutting.
概念上,这种结构可以以横切的方式在程序元素上附加注释。
Conceptually, such a construct allows you to attach annotations to program elements in a crosscutting manner.
静态横切和动态横切的区别在于它不修改一个给定对象的执行行为。
Static crosscutting differs from dynamic crosscutting in that it does not modify the execution behavior of a given object.
AOP工具的设计目标是把横切的问题(例如认证和事务管理)模块化。
AOP tools are designed to modularize crosscutting concerns, such as authentication and transaction management.
一个连接点是在代码中被很良好定义的,我们所关注的应用程序横切的点。
A join point is a well-defined point in the code at which our concerns crosscut the application.
把他们联系在一起的,是一个外部楼梯,揭示了横切的砖外观。
They are linked by an external staircase, which is revealed by cutaways in the brick facade.
以横切的方式对待安全性关注点的真正妙处是:可以有效地重用这些关注点。
The real beauty of treating safety concerns in a crosscutting manner, however, is that you can effectively reuse them.
这些概念是动态横切的核心,虽然正如我们即将看到的,它们并不全都是静态横切所必需的。
These concepts are central to dynamic crosscutting, although as we'll see they are not all required for static crosscutting.
但是,虽然合约本身是BankAccoun t域所必不可少的部分,但这个信息的使用则是横切的。
However, while the contract itself is integral to the BankAccount's domain, how that information gets used is crosscutting.
目的通过脊髓半侧横切的方法建立灵长类恒河猴脊髓半横切损伤动物模型,用于神经再生的研究。
Objective To establish an animal model of spinal cord injury by lateral hemisection of cervical spinal cord in rhesus monkey for studying regeneration of spinal cord.
由于横切的问题在系统中是如此基本的一个问题,所以MDD工具会从模型化的横切结构以及生成的方面中获益。
Since crosscutting concerns are so fundamental in systems, MDD tools will benefit from modeling crosscutting structure and generating aspects.
正如前面看到的,AspectJ编辑器中的标记和CrossReferences视图清楚地在每个文件的基础上表现出了横切的特性。
As you saw earlier, markers in the AspectJ editor and cross References view clearly show you the nature of crosscutting on a per-file basis.
这个问题更多时候与横切功能的本性有关、而不是与解决方案有关。
This issue has to do more with the nature of the crosscutting functionality than the solution itself.
在本文中,我将介绍测试用方面实现的横切行为的一组技术。
In this article, I introduce a catalog of techniques for testing crosscutting behavior implemented with aspects.
不过,它可帮助您理解并获得对应用程序的横切关注点的信任。
However, it will help you to understand and gain confidence in your application's crosscutting concerns.
横切数个类的行为给集成测试带来了一个特定问题。
Behavior that crosscuts a number of classes poses a particular problem for integration tests.
除了排除元素签名的纠结外,还可以使用注释来表达与代码的横切关注相关的任何数据。
In addition to untangling element signatures, annotations can be used to express any data associated with your code's crosscutting concerns.
用注解捕获应用中特定的横切关注点是一种很简单的方式。
Annotations are an easy way to capture certain crosscutting concerns in the applications.
如果程序元素的横切特性发生改变,那么它的名字和它的所有引用者都需要做相应的改变。
If a program element's crosscutting characteristics change, its name and all its referers will need to be changed accordingly.
这使它特别容易采用,而且对于一些粗粒度的横切很有用。
This makes it particularly easy to adopt and useful for coarse-grained crosscutting.
可以看出,对于将横切元素的名字分解为多个部分,使用注释很方便。
As you can see, annotations are very handy for untangling the names of crosscutting elements into multiple pieces.
关于测试广泛分布的横切关注点的一个难题是它会报告太多的联结点。
One of the hard things about testing a widespread crosscutting concern is that it can advise so many join points.
在大型项目中管理这些变化是非常具有挑战性的,特别是在有大量横切功能的时候。
Managing this change with large projects can be challenging, particularly when there is a great deal of crosscutting functionality.
因为横切行为的实现是分散的,开发人员发现这种行为难以作逻辑思维、实现和更改。
Because the implementation of a crosscutting behavior is scattered, developers find the behavior difficult to reason about, implement, and change.
可以利用这种关注点的分离分别测试横切规范及它们的行为。
You can leverage this separation of concerns to test their behavior separately from the crosscutting specification.
横切比较允许对项目中的横切关系制作一个快照,然后用快照与该项目以后的版本中存在的关系进行比较。
Crosscutting Comparisons allows you to take a snapshot of the crosscutting relationships in your project and then compare the snapshot with relationships present in a later version of the project.
另外一个选项是显示当前文件整体的横切信息,而不仅仅显示当前元素的横切信息。
Another option is to show the crosscutting information for the whole of the current file, instead of just the current element.
应用推荐