Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Problem with @this(..)

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
See also:
http://aquarium.rubyforge.org     AOP for Ruby
http://www.contract4j.org         Design by Contract for Java5




Back to the top