Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Creating a crosscut using ClassLoader.Loadclass using AspectJ

Ramnivas Laddad schreef:
Since you aren't (likely) weaving the code that calls ClassLoader.loadClass(), you pointcut won't work.

You should perhaps try something like:

pointcut classLoading() : staticinitialization(*);

Then in advice, you can get access to the class object using thisJoinPoint.getSignature().getDeclaringType().

-Ramnivas

Dear Sir,

What do you mean by weaving?
The loadClass() call is definitely made, otherwise the JVM can not load any classes.

On the other hand, I will try your proposed solution and hope it works.
Thank you very much!

Yours sincerely,

Boudewijn Ector


Back to the top