Skip to main content

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

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

Back to the top