Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Unexpected weaving

Title: Unexpected weaving
 
Thanks for the help, but I don't understand why this is ...
 
is it because the noTraceInternal pointcut matches the IDL classes even though the advice stipulates the noInternalClasses should be avoided???
 
 


From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Ron DiFrango
Sent: 10 October 2006 15:31
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Unexpected weaving

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?


From: aspectj-users-bounces@xxxxxxxxxxx on behalf of David Hatton (AT/LMI)
Sent: Tue 10/10/2006 9:35 AM
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Unexpected weaving

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.

 

From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Ron DiFrango
Sent: 10 October 2006 14:04
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] Unexpected weaving

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




Back to the top