For the next iteration we'll add in some around advice.
对于接下来的迭代,我们将加入around advice。
In the Listing 6 code, I've kept the around advice processing simple.
在清单6的代码中,我尽量使around advice的处理简单化。
As you might expect from the name, an around advice surrounds the pointcut execution.
从名字上可以看出,around advice包围了pointcut执行。
For this purpose, I'll also change my advice to a different type: the around advice type.
为此,我还要将这个advice改为另一种类型:around advice类型。
I constrained the solution in one important place: the around advice declares it returns void.
我在一个重要的地方限制了这一解决方案:around通知声明它返回void。
Similarly, around advice can declare a return value (" void "above), which requires any join point have the same return value.
类似地,around通知可以声明一个返回值上面的“void”,要求所有链接点具有同样的返回值。
For example, below I define the IClosure wrapper interface, wrap proceed (..) in the around advice, and pass the result to the recurse (..) method.
比如,下面定义了IClosure包装器接口,将proceed(. .)包装到around通知中,并把结果传递给recurse (. .)。
It would also be necessary to use Around advice (an interceptor) rather than Before advice, because EJB 3.0 does not offer specialized advice types.
同样有必要使用Around通知(拦截器)而不是Before通知,因为EJB3.0没有提供特殊的通知类型。
Then we use the around advice to replace the call with a call to the new service, after extracting the required information from the calling client.
然后在从调用客户中抽取需要的信息之后,我们使用around通知,用新服务的一个调用来替代那个调用。
Finally, invariant tests use around advice, where the tests are evaluated both before and after join point execution with the exceptions noted previously.
最后,不变条件测试使用around建议,在该建议中,在连接点执行之前和之后都计算测试,同时具有前面提到过的例外。
As for code running the join point, unlike the usual around advice, this one calls proceed (..) once for each configuration, so the underlying join point can run many times.
对于运行连接点的代码,与通常的around通知不同的是,它对每个配置都调用proceed(. .)一次,因此底层连接点可运行多次。
Around advice is a more powerful advice type, in that it can modify the flow of the application - it has the power to decide whether or not our target method even get's executed.
around advice是更强大的advice类型,在其中它可以修改应用的流程——它有权决定我们的目标方法是否被执行。
In the 1980s, he went around the world and gave advice about growing rice to farmers in other countries.
20世纪80年代,他周游世界,为其他国家的农民提供种植水稻的建议。
No one was around to give me advice about boys or fashion.
周围没有人能够在男孩子或流行时尚方面给我建议。
You may feel as I did in 1999 that the more smart people around the table the more intros you'll have, the more sage advice you'll receive and the more impressive you'll seem to outsiders.
你可能和我在1999年时所感觉的一样,围着桌子有越多的精明人就有越多的介绍,你会收到更精明的建议以及对局外人来说你将会更引人注目。
New research is strengthening evidence that following mom's admonition to eat your vegetables may be some of the best health advice around.
一项最新调查进一步证明,“听妈妈的话,多吃蔬菜”可能是最有益健康的建议之一。
So my advice to you is simply this: Never let anyone push you around.
我给你的建议就是:不要让任何人控制你。
Advice is code that executes before, after, or around a join point.
Advice是在joinpoint之前、之后或周围执行的代码。
This was actually good news for Darwin, as it gave him more time to wander around the museums, seeking advice from the various experts in botany, taxidermy, geology and animal anatomy.
这对达尔文来说其实是好消息。因为这使他有时间逛博物馆,请教诸如植物学、动物标本剥制术、地质学和动物解剖学等各方面专家。
And hey, mister, how would you like it if your wife walked around telling people that you need career advice but won’t get it yourself, so she’s getting it for you?
嘿,先生,假如你妻子到处告诉别人你需要职业方面的建议但是不敢自己去问,所以她帮你问,你会怎样呢?
Around 50% of the chief executives interviewed said they found the job "intensely lonely" and did not know who to turn to for advice.
大约有50%被采访的首席执行官说他们发现这工作“非常的孤独”,他们也不知道应该向谁请教。
When people feel lost, they often go around asking for advice, when they actually need affirmation.
当人们感到迷失的时候他们常常到周围去咨询建议,而实际上他们需要的是肯定。
In our experience, scheduling meetings is a chore, with the most common method to be just emailing around to solicit advice.
在我们的经历里,安排会议是件麻烦事,最常用的方法是四处发邮件,收集各人的建议。
ANN ARBOR, Mich.---With school days just around the corner, a University of Michigan researcher has some advice for parents who want to increase their children's academic success.
密西大学--安娜堡分校---随着开学的日子临近,密歇根大学的一位研究员对想提高孩子的学业成绩的家长们有几点建议
Jeff: For once it's me giving you advice and not the other way around!
杰夫:这次是我给你的建议,往常正好反过来!
There is a lot of advice floating around.
有很多意见漂浮。
That advice, particularly in America, typically revolves around food.
这些建议通常都是与美食相关,在美国体现的尤为明显。
Easygoing, you are most happy when taking care of others. you make people feel comfortable around you and they always ask for your advice when they have problems.
随和,在照顾别人的时候,你非常开心。你使你周围的人感受非常舒服,并且当他们有问题的时候,他们总是征求你的建议。
If we want some sound advice, we can turn to the old people around.
如想获得正确的建议,我们可以向身边的老人求助。
If we want some sound advice, we can turn to the old people around.
如想获得正确的建议,我们可以向身边的老人求助。
应用推荐