Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AspectJ: two kinds of tutorials

Tags:

java

aspectj

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.

Could you recommend some tutorials?

like image 545
alicjasalamon Avatar asked Aug 01 '12 14:08

alicjasalamon


1 Answers

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

like image 118
Tomasz Nurkiewicz Avatar answered Sep 28 '22 07:09

Tomasz Nurkiewicz