Re: [aspectj-users] Catching/monitoring for Constructors

2008-07-14 Thread Tyler DeWitt
Thanks for the help! I didn't realize there was a method pattern AND a constructor pattern. I'll look more into the details, but I think that was the confirmation I needed. Tyler On Mon, Jul 14, 2008 at 4:56 PM, Andrew Eisenberg <[EMAIL PROTECTED]> wrote: > See comments below: > > > public asp

Re: [aspectj-users] Catching/monitoring for Constructors

2008-07-14 Thread Andrew Eisenberg
See comments below: > public aspect ThreadTest { > pointcut all():execution(*.new(..)) && !within(ThreadTest) && > !within(Holder) &&!within(com.vladium..*); > > after(): all() > { > System.out.println("Success"); > } > } This aspect works as expected, I hope. Remember th

[aspectj-users] Catching/monitoring for Constructors

2008-07-14 Thread Tyler DeWitt
Hi all, I must have overlooked something in the documentation. I want an aspect to be applied everytime a constructor is called (by way of a new ie String myString = new String(). After much fidgeting, I have developed this aspect: public aspect ThreadTest { pointcut all():execution(*.ne

Re: [aspectj-users] @DeclareParents

2008-07-14 Thread Kruttik
Did you by any chance find the solution. I am stuck on the same problem. I am not able to get the setter to work. Please help. Brian Ericson wrote: > > Uh... I don't know that I can... I'm getting totally inexplicable > behavior... I copied the example I'd originally sent for RC1 (a couple

Re: [aspectj-users] Calling proceed in a method

2008-07-14 Thread Ashley Williams
Thanks, although a little clunky this looks a whole lot better than copy and paste.[EMAIL PROTECTED] wrote: ->To: aspectj-users@eclipse.org>From: "Ramnivas Laddad" <[EMAIL PROTECTED]>>Sent by: [EMAIL PROTECTED]>Date: 07/14/2008 01:40AM>Subject: Re: [aspectj-users] Calling proceed in a method>>A

Re: [aspectj-users] Calling proceed in a method

2008-07-14 Thread Ashley Williams
Hi Andy,Perhaps my use-case wasn't well described, but all I am attempting to do is to is refactor code from pieces of around advice, including the call to proceed(), to a common method. If there are implementation difficulties that mean this is too difficult to support in AspectJ then I am happy t