[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] Is this possible with AspectJ (or AOP in general)?
- From: Paulo Alexandre Corigo Zenida <paulo.zenida@xxxxxxxx>
- Date: Sat, 10 Feb 2007 13:38:22 +0000
- Delivered-to: email@example.com
- User-agent: Internet Messaging Program (IMP) H3 (4.1.3)
As far as I know, it is not possible for AspectJ to do weaving in JDK
classes. From what you have described, I suppose what you are defining
in your pointcut is something like:
public pointcut myPointcut() :
execution(public void java.awt.Component+.paint(java.awt.Graphics));
The previous will try to do weaving on the callee code, i.e., on the
Swing class that, if belongs to the JDK, will not be weaved. You will
only have success for your own classes extending Swing ones or calls
to Swing methods that occur within your own project.
I hope this helps. Regards,
Citando ernii <ernii_23@xxxxxxx>:
I'm new to AOP and trying to understand wether I can do the thinks I want to
do with AOP (especially AspectJ wich seems to be the most complete solution
- and I really like eclipse ;)
I would like to add some general behaviour while painting to all swing
components that I am using in my program ... not only the onces I create in
So I tried to make a pointcut at void
java.awt.Component.paint(java.awt.Graphics) and that worked only with
classes within my project that have overriden the paint method.... is there
a way (I thought with load- or runtime weaving it should be possible) to do
that? Do I need to configure the LTW or is it just not possible?
View this message in context:
Sent from the AspectJ - users mailing list archive at Nabble.com.
aspectj-users mailing list