Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] @this(@Foo) does not work

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[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)?

- --
:alex |.::the_mindstorm::.|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFCFkmYTTDTje0R2dgRAgjfAJ9a0K75UePEGAhhUcLHZ5sR25DFJACgkuQz
8U/Ji8MTBWBH4kYqFCGEHt8=
=h9zH
-----END PGP SIGNATURE-----


Back to the top