Not really, because if you do not specify a target you will catch calls to other PrintStream.print* methods for targets not equal to System.out or System.err. Lucky you if your application does never use PrintStream for any other purpose. ;-)
Alexander Kriegisch > Am 23.12.2013 um 12:50 schrieb Krishna Jasty <krishna.ja...@tcs.com>: > > correct, call(* java.io.PrintStream.print*(..)) will solve the puzzle. > > > > From: Alexander Kriegisch <alexan...@kriegisch.name> > To: "aspectj-users@eclipse.org" <aspectj-users@eclipse.org> > Date: 12/23/2013 04:57 PM > Subject: Re: [aspectj-users] pointcut specification for System.out calls > Sent by: aspectj-users-boun...@eclipse.org > > > > > I am nowhere near a PC, so I cannot test anything now, but anyway: > System.out.println(..) is not a valid method signature. System.out is just a > static member of type PrintStream. So you want to catch something like > PrintStream.println(..) && target System.out, I guess. > > -- > Alexander Kriegisch > > > Am 23.12.2013 um 06:45 schrieb Krishna Jasty <krishna.ja...@tcs.com>: > > Hi , > > Can any body tell me how to specify pointcut for System.out.print or println > calls in the aspectj framework. > > i specified as follows, but which is not capturing the calls. > pointcut syscall(): call(* java.lang.System.out.println(..)); > > Thanks, > Krishna > =====-----=====-----===== > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users_______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users