Well,
I see the following that would pick any
classes in com.ericsson.nms.cif.cs:
pointcut
noTraceInternal()
// no need to trace simple getter
methods with no parameters
:
execution (public * com.ericsson.nms.cif.cs..*.get*())
||
// no need to trace simple
boolean methods with no
parameters
execution
(public * com.ericsson.nms.cif.cs..*.is*());
// Internal Public cslib
methods
pointcut publicCsMethods() :
(execution (public *
com.ericsson.nms.cif.cs.*.*(..))
||
execution (public *
com.ericsson.nms.cif.cs.ldap.*.*(..)))
&&
! omittedClasses()
&&
!
noTraceInternal();
pointcut
protectedCsMethods() :
(execution(!public !private * com.ericsson.nms.cif.cs.*.*(..))
||
execution(!public
!private * com.ericsson.nms.cif.cs.ldap.*.*(..)))
&&
! noTraceInternal()
&&
!
omittedClasses();
That is why those are getting matched
during yoru compile cycle and not showing up in AJDT.
So, I am not certain you are doing anything
wrong, it is just that your pointcut is written in such a way to pickup
everything in those packages.
Why don't you want the IDL generated code
matched?
OK,
the classes which end up being woven are IDL generated classes. These classes
all end up in a package called
com.ericsson.nms.cif.cs.Configuration (and further
sub-packages).
My
aspect picks up on classes in com.ericsson.nms.cif.cs and other sub-packages but
not Configuration (as far as I can see).
It's a
bit complicated but here it is anyway ...
We
could get around this by not generating the IDL until the weaving is completed,
but I would prefer to understand what I'm doing wrong.
Can you give more details
like the aspect and the classes that appears to be woven even though they should
not be?
From: aspectj-users-bounces@xxxxxxxxxxx on
behalf of David Hatton (AT/LMI)
Sent: Tue 10/10/2006 8:52
AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users]
Unexpected weaving
Hi,
I am encountering some problems with certain classes
being woven when not expected.
Looking at my aspects these classes should not match
any of the defined pointcuts, yet are being output as being woven when I run the
ANT iajc task in verbose mode.
Using AspectJ inbuilt into Eclipse it is showing
these particular classes as being un-affected by the aspect I have defined, i.e.
there are no cross-references being detected by the Eclipse plug-in.
Is there any way I can determine which advice is
affecting the classes concerned during the Ant task?
/David