The compiler takes each aspect and creates class files that contain the advice code.
编译器接受每一个方面,并建立包含通知代码的类文件。
But every class I ever taught to starts of getting it wrong in almost every aspect so don't be worried If you do.
但是我教的每个班里都有人误解,几乎每个方面,所以如果误解了也不要担忧。
Ms. Glickman recently started a project in her 'Personal Wellness' class. The assignment: change one aspect of your daily health routine to reduce stress, and keep a journal of your progress.
格利克曼最近开始参加她的“个人健康”课上的一个项目,任务是:改变日常健康习惯的一个方面以减少压力,并记录你的进展。
You've already seen how the aspect delegates to another class to handle the actual text highlighting.
我们已经看到了方面如何委派到另一个类中以处理实际的文字突出显示。
This is similar to an abstract class where some of the code is left to the programmer to implement in a derived class -- or, in this case, a derived aspect.
一个抽象的类的一些编码被留给了编程人员,编程人员使用它在一个导出的类中执行,或者在一个导出的方面中执行。
Groups of methods implementing a particular aspect of behavior can be gathered together in a mix-in that is added to any class that needs that behavior.
实现某一方面行为的方法组可以在混合式中聚集在一起,该混合式被添加到任何需要此行为的类中。
Because code may be changed by an aspect, unit tests that run perfectly on a class may behave quite differently when the class is integrated into an AOP system.
由于代码可以被某一个方面所改变,在一个类上可以完美运行的单元测试当这个类被集成入一个AOP系统中可能会出现完全不同的运行状况。
It is enough for him he says if each class shares in some aspect of the governing power.
对他而言,只要每个阶级多少分享到一些统治权力,那即也足够。
In this example, I've used the Participant pattern-like collaboration with one annotator aspect per class.
在这个例子中,我使用了Participant模式类型的协作,每个类有一个注释者方面。
Listing 9 shows the Customer class with an annotator aspect.
清单9显示了带有注释者方面的customer类。
Similarly, a mock target is a class that imitates a legitimate advice target for some aspect you are attempting to test.
与此类似,mock目标是一个模仿要测试的一些方面的合法建议目标的类。
Similarly, the Account class in Listing 10 includes an annotator aspect.
与此类似,清单10中的Accoun t类包括一个注释者方面。
But if you picked a specific domain class (say the Customer class) and tested the error handling aspect against it, you would risk muddying the intent of your test.
但是如果选择了特定的域类(比如customer类),并测试了它的错误处理方面,那么就会有模糊测试目的的可能性。
An aspect can be targeted to apply to a specific package, class, or method. Using aspects in an application requires two things.
可以将一个方面应用于一个特定的信息包,类或方法。
You may be wondering why I've used an aspect for management rather than simply adding support directly into the PerfStatsImpl implementation class.
您可能想知道为什么我用方面进行管理而不是直接把支持添加到PerfStatsImpl的实现类中。
By making your aspect general enough to affect a mock target inside a test class, you ensure that it's also easy for a real class to participate in the aspect's behavior.
通过使方面足够一般化,可以影响测试类中的mock目标,还会保证它可以容易地让真实类参与方面的行为。
The use of the Participant pattern with one aspect per class considers a class as a subsystem, though any logical division into a subsystem will do just fine.
使用每个类具有一个方面的Participant模式, 将每个类视为一个子系统,而将任何逻辑分为子系统都可以做得很好。
The logic diagrammed in Figure 2 is common to all contracts, so you can develop a common abstract aspect that specifies it. Figure 3 shows a class and aspect diagram of the solution.
图2中的逻辑图对于所有契约都是相同的,所以可以开发一个指定它的公共抽象方面。
To do this the default fetching pattern in the Repository/DAO class is overridden by a different fetching pattern based on the specific use case as defined in the Aspect class.
就像Aspect类所定义的那样,我们可以根据特定的操作使用不同的抓取机制来覆盖Repository/DAO类所定义的默认抓取模式。
To do this using AspectJ, you must compile your class and aspect code with the ajc compiler.
要使用AspectJ 完成这个操作,必须使用ajc编译器来编译类和Aspect代码。
The completions offered at the given location are therefore in the context of the Point class instead of that of the defining aspect.
在图示的位置上,代码补全功能提供的是在Point类的上下文中,而非所在aspect的上下文中。
The one I present in this article only crosscuts one class, but the principles are the same. Listing 1 contains one implementation of the Highlighter aspect.
我在本文中展示的这个例子只横切一个类,但是原理是一样的。
Listing 1 shows an example of an aspect class defining a pair of methods intended to be used as before-and-after advice on a method call.
清单1显示了一个aspect类的例子,它定义了在方法调用上,将被用作前advice和后advice的两个方法。
You've got two ways of implementing aspect handling using AspectWerkz: build-time class modification and run-time class modification.
有两种用AspectWerkz实现aspect处理的方法:编译时类修改和运行时类修改。
The Listing 2 configuration defines a single aspect, as implemented in the class com.sosnoski.aspectwerkz.TraceAspect.
清单2 的配置定义了一个aspect,如在类 com.sosnoski.aspectwerkz.TraceAspect 中所实现的。
The network is a key aspect of virtualization and represents a first-class element of the virtualization set.
网络是虚拟化的一个关键方面,代表虚拟化设置中第一等的元素。
This class is an implementation of an operation, and only the concrete operation can be made aspect-aware.
这个类是一个操作的实现,并且仅仅具体的操作可以创建。
The same sort of thing is happening in health care, another aspect of human capital: middle-class people lead healthier lives than the poor, go to the doctor more often and spend more per visit.
医疗保健和人力资本也是如此。中产阶级的人比穷人更健康,去看医生的更频率更多,每看一次看病花的也更多。
Technical aspect: World class producer, international behind-the-scenes team, UK's BBC recording from start to finish, all aspects of technical production reaching international standards.
技术层面:世界级制作人统筹,全国际化幕后班底,英国BBC全程录制,全面与国际技术接轨。
Technical aspect: World class producer, international behind-the-scenes team, UK's BBC recording from start to finish, all aspects of technical production reaching international standards.
技术层面:世界级制作人统筹,全国际化幕后班底,英国BBC全程录制,全面与国际技术接轨。
应用推荐