[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] around advice
|
You are using print() method, when a pointcut is expected.
Change your advice to:
void around(String prefix, Object message) :
execution(void print(String, String)) && args(prefix, message) {
...
Please read the AspectJ user guide or one of the AspectJ books.
-Ramnivas
--- Rohith Ajjampur <ajjampur@xxxxxx> wrote:
> Hello all,
>
> I have an aspect with a method named print() and an around advice
> which looks
> like below:
>
> void around(String prefix, Object message): print(prefix,
> message) {
> System.out.println("regular proceed");
> proceed(prefix, message);
> }
>
> private void print(String prefix, Object message) {
> for (int i = 0, spaces = callDepth * 2; i < spaces; i++) {
> System.out.print(" ");
> }
> System.out.println(prefix + message);
> }
>
> method print() gets called in the same aspect in after and before
> advices, after
> i build this with ajbrowser i get an error that says: "can't find
> referenced
> pointcut". Can anybody tell me where i'm going wrong.
>
> Rohith.
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/