[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[aspectj-users] Creating a crosscut using ClassLoader.Loadclass using AspectJ
- From: Boudewijn Ector <boudewijn@xxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 04:25:22 +0100
- Delivered-to: firstname.lastname@example.org
- User-agent: Thunderbird 188.8.131.52 (X11/20071031)
For a university assignment, I had to do a number of assignments. One of
these (the last one) is creating an aspect which checks for code
coverage, specifically function coverage.
To do so, I planned to use a crosscut on the ClassLoader.LoadClass
function, so I can check each class which is loaded in order to list
it's methods (it's okay to check only the loaded classes).
But whatever I'm doing, the Aspect just won't get triggered.
My current code :
after() returning(Class <?> c): target(ClassLoader) && call (Class<?>
loadClass(..)) && !within(SWE35)
SWE35 is the current aspect. Afaik, this should work but I've also
tested while removing the <?> part (generics don't have to be
explicitely mentioned afaik). Can someone tell me what I'm doing wrong?
I've written succesfully about 25 aspects, but I just can't figure this
I'm using Sun Java 1.6 on a Linux box, and Eclipse-3.2 using it's
respective AspectJ plugin (the newest one) without further security