Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] class patterns in 1.1

Hi all!

I'm just starting with aspectj and I am continually encountering problems.
I am having difficulties getting the pointcuts right.

Aaaaanyway, I tried a variant of the example on

http://aspectj.org/doc/readme11/index.html#INSTANCEOF_ON_WILD

My code is

package no.milron.espresso.aspects;

aspect LogAspect {
  private interface LogObject {}
  declare parents: com.donv..* implements LogObject;

  pointcut logPoints() :
    call(public * *(..))
    && !within(LogAspect)
    && target(LogObject)
    ;

  before() : logPoints() {
    System.out.println("AspectJ ELog " + thisJoinPoint);
  }
}


and I get the following error:

java.lang.IllegalAccessError: com.donv.espresso.servlets.EspressoServlet:
trying to access class no/milron/espresso/aspects/LogAspect$LogObject

Why does "this()" work but "target()" doesn't?


Uwe
_________________________________________
Uwe Kubosch
Adviser eCommerce
ICQ#: 71437007
More ways to contact me: http://wwp.icq.com/71437007
_________________________________________



Back to the top