[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] @this(@Foo) does not work
|
Alexandru Popescu wrote:
[quote Oli B.::on 2/18/2005 9:27 PM]
| Hi,
|
| I'm just trying the new AspectJ5 features for my new book using the
| AspectJ 5 Developers Notebook. But with the @this(@Foo) (and the
| following examples) I have problems. Here is my example:
|
| after() : call(public * *.*(..)) && @target(@Role) {
| log.info("@@@ " + thisJoinPoint.toShortString());
| }
|
| I want to log all calls where the target has a @Role annotation. The
| compilation is successful but when I start my test cases I get a
|
| java.lang.NoClassDefFoundError: Role
| at space.LogBook.ajc$after$space_LogBook$1$69ac1cc5(LogBook.aj:38)
| at space.Taxi.<init>(Taxi.java:24)
| at space.test.TaxiTest.setUp(TaxiTest.java:31)
| at junit.framework.TestCase.runBare(TestCase.java:125)
| ...
|
| I'm using Eclipse 3.1M4 with AJDT 1.2.0.20050204153223 on Linux. Is it a
| problem with the pre version or is it a problem of my understanding?
|
| regards
| Oliver
Have you correctly imported the @Role annotation (if it is placed in
another package than the aspect
package)?
yes, I imported the annotation package with Role in the aspect
(otherwise it would not compile).
any other ideas?
oliver
--
Oliver Böhm
mailto:boehm@xxxxxxxxxx
http://www.javatux.de