Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] variable argument matching based on annotations

Hi,

Unfortunately there is an open enhancement request for this but no
decent (and straightforwardly implementable) syntax.  So you need to
create a few that match the options:

* *(@Secured *,..)
* *(*,@Secured *,..)
* *(*,*,@Secured *,..)
* *(*,*,*,@Secured *,..)

they can all dispatch to the same advice of course.

cheers
Andy

On 30 October 2011 09:46, Dénes Németh <mr.nemeth.denes@xxxxxxxxx> wrote:
> Hi,
>
> I would like to create a pointcut, which mathces those methods of any class,
> that has at least one argument, that is annoted with the Secured annotation.
> Let us assume that we do not know the number of argument or the number of
> maximal arguments...
>
> example:
>
> class NotKnown{
>    void foo1(int x, @Secured String a){ ... }
>    void foo2(@Secured String a, boolean b){ ... }
> };
>
> The incorrect pontcut:
> * *.*(..., @Secured *, ...)
>
> Many thanks
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top