Maybe I'm going about it the wrong way. Is there a way to match a method
that has a parameter of a given type (or annotation), regardless of the
position? In particular, I'm trying to write an aspect that will perform a
null pointer check for parameters with a @NotNull annotation.
Thanks,
Srdan
On Thu, May 15, 2008 at 5:12 PM, Andy Clement <[EMAIL PROTECTED]>
wrote:
> 4th and 5th are actually not allowed I'm afraid. You can't use '..'
> in two places - really you should get an error for (4) and the fact
> you don't is a regression.
>
> Andy.
>
> 2008/5/15 srdan bejakovic <[EMAIL PROTECTED]>:
> > I haven't been able to match an annotated method parameter if it's
> > surrounded on both sides by the .. wildcard. In the code below, the first
> 4
> > advice declarations match foo, but the fifth doesn't. Am I doing
> something
> > wrong or is this not allowed or is it a bug? Thanks for your help.
> >
> > @interface A {};
> > public void foo(@A String s) {}
> > 1 before(): execution(* *(@A (*))) {}
> > 2 before(): execution(* *(.., @A (*))) {}
> > 3 before(): execution(* *(@A (*), ..)) {}
> > 4 before(): execution(* *(.., String, ..)) {}
> > 5 before(): execution(* *(.., @A (*), ..)) {}
> >
> > _______________________________________________
> > 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
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users