[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] newbi question regarding advice
|
A before or after advice will work just fine for your purpose:
aspect AdvisePrintName {
before(String name) : execution(public void printName(String))
&& args(name) {
System.out.println("The string name is " + name);
}
}
-Ramnivas
--- qqasim@xxxxxxxxxxxxxx wrote:
> Hi,
> Aspectj has advice such as before() and after() which run before and
> after the
> execution of a method.
>
> But which advice do I need to use if I want to do something DURING
> the
> execution of a method.
>
> So for instance when the following method is called, I want to print
> 'String
> name' using aspect advice.
>
> public void printName(String name){}
>
> regards
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
=====
Ramnivas Laddad
Author, AspectJ in Action
http://www.manning.com/laddad
http://www.amazon.com/exec/obidos/ASIN/1930110936
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com