Cool. I've now read that bug's comments once. I'm going to have to reread a few more times before I can comment intelligently.... :)
On Mon, Feb 13, 2012 at 10:21 AM, Andy Clement <[email protected]>wrote: > Hi Matthew, > > This is discussed in here: > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=233718 > > but there are still issues around agreeing a syntax (and a reasonable > implementation). > > At the moment the best you can do is what you have, support annotation > of argument 'n' by having variants for each. > > Maybe add your proposed syntax to that bugzilla as a suggestion, I > don't think we have something like that. > > cheers, > Andy > > On 12 February 2012 09:03, Matthew Adams <[email protected]> wrote: > > Hi all, > > > > Just wondering if there's a way to express a pointcut meaning "any method > > with any parameters annotated with @javax.validation.constraint.*". > > > > For example, these would match: > > public void m1(@Foo in x, int y) ... > > public void m2(int x, @Foo int y) ... > > public void m3(@Foo int x, @Foo int y, int z) ... > > > > These would not: > > public void m1(int x) ... > > public void @Foo m2(int x) ... > > public void m3(int x, int y, int z) ... > > > > The best I've come up with is support for a fixed set of pointcuts of > size n > > that supports the first n arguments: > > > > pointcut validatedMethodCall() : > > execution(* *(@(javax.validation.constraints.*) (*), ..)) > > || execution(* *(*, @(javax.validation.constraints.*) (*), ..)) > > || execution(* *(*, *, @(javax.validation.constraints.*) (*), ..)) > > || execution(* *(*, *, *, @(javax.validation.constraints.*) (*), > > ..)) > > || execution(* *(*, *, *, *, @(javax.validation.constraints.*) > (*), > > ..)) > > || execution(* *(*, *, *, *, *, @(javax.validation.constraints.*) > > (*), ..)) > > || execution(* *(*, *, *, *, *, *, > @(javax.validation.constraints.*) > > (*), ..)) > > || execution(* *(*, *, *, *, *, *, *, > > @(javax.validation.constraints.*) (*), ..)); > > > > I'd prefer a more general syntax. Something like the following would be > > nice: > > > > pointcut validatedMethodCall() : > > execution(* *(@(javax.validation.constraints.*) (..))) > > > > Thanks, > > Matthew > > > > > > -- > > View this message in context: > http://aspectj.2085585.n4.nabble.com/Pointcut-for-where-any-parameters-are-annotated-by-tp4381499p4381499.html > > Sent from the AspectJ - users mailing list archive at Nabble.com. > > _______________________________________________ > > aspectj-users mailing list > > [email protected] > > https://dev.eclipse.org/mailman/listinfo/aspectj-users > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > -- @matthewadams12 mailto:[email protected] skype:matthewadams12 yahoo:matthewadams aol:matthewadams12 google-talk:[email protected] msn:[email protected] http://matthewadams.me http://www.linkedin.com/in/matthewadams
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
