AspectJ:两种教程 [英] AspectJ: two kinds of tutorials

查看:158
本文介绍了AspectJ:两种教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从我的研究中我知道有两种方法可以使用AspectJ。首先是创建 A.aj 类,然后在 A中添加注释 @Aspect 。的java

From my research I know there are two ways of using AspectJ. First is by creating A.aj class and second by adding annotation @Aspect in A.java.

我正在为第二种寻找一个好的教程,特别是关于

I was looking for a good tutorial for this second kind, especially about lines like

@After("call(void fooMethod())")  
@Around("call(void sendAndReceive())") 
@Before("execution(String greeting(..)) && args(context)")

但我不知道他们是怎么回事叫。

but I don't know how they are called.

你能推荐一些教程吗?

推荐答案

这种风格被称为 @AspectJ 以强调注释的作用。请查看官方文档@AspectJ备忘单

This style is called @AspectJ to emphasize the role of annotations. Have a look at official docs and @AspectJ cheat sheet.

这篇关于AspectJ:两种教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆