Try @annotation instead of @this in your pointcut.

dean

On Jan 24, 2008, at 5:56 AM, Thorsten Jungblut wrote:

Hi,

...
public aspect AuthenticationAspect {
 pointcut authRequiredMethodExecution(Sample s, AuthRequired ar)
   :execution(@AuthRequired * Sample+.*(..)) && this(s) && @this(ar);

before(Sample s, AuthRequired ar) : authRequiredMethodExecution(s,ar) {
   doSomethingUsefull();
 }
}
...

Dean Wampler, Ph.D.
dean at objectmentor.com
http://www.objectmentor.com
See also:
http://www.aspectprogramming.com  AOP advocacy site
http://aquarium.rubyforge.org     AOP for Ruby
http://www.contract4j.org         Design by Contract for Java5



_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to