Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Need suggestion in adding a line of code inside a method through aspectJ

Hi Everybody

I am new to this mailing list.

Actually i have started using aspectJ very recently in my project and i am finding it very cool way of programming.
I have one query of which i am trying to find a solution so need your suggestions.

My business case is very simple :

1. I have a method say showUserDetails()  in various java files of my project , i want to add a single line of code in this method through aspectJ. I dont want that i should go in each java file and add manually everywhere in this method.

2. I thought about aspectj (I hope my smart thought for this case :) ).

3. I have made pointcut to point to implementation of all these java methods.

4. i am not sure that how i can achieve this....Should i use around advice or what........

Can you guys please let me know the way to do it.

Thanks a TON in advance for your support.

Regards
Santosh

Back to the top