Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Is this a bug or my pointcut problem?


Hi Alan,

What do you see if you remove the target part of your pointcut so that your aspect looks like this ...

public aspect AspectDebug {

pointcut tagExecute() :

    call (void com.naryx.tagfusion.cfm.tag.cfTag.render(..));
               
before() : tagExecute(){
 System.out.println( "tagExecute:" + thisJoinPoint.getThis() );
}
}

Also, when you say that your current aspect picks up other classes with the same render() signature but in other packages, are those classes related to com.naryx.tagfusion.cfm.tag.cfTag ?

Best regards,
George
________________________________________
George C. Harley




Alan Williamson <alan@xxxxxxxxxxxxx>
Sent by: aspectj-users-admin@xxxxxxxxxxx

27/05/2004 16:31

Please respond to
aspectj-users

To
aspectj-users@xxxxxxxxxxx
cc
Subject
[aspectj-users] Is this a bug or my pointcut problem?





Afternoon one and all,

I successfully downloaded and install the latest ADJT for Eclipse3M9 and
its working a whole lot better than the previous version.

Now i have a problem here i am not sure if its a bug in the Aspect
compiler or its a problem in my point cut.

Here is my Aspect;
-------------------------
public aspect AspectDebug {

pointcut tagExecute() : call (void
com.naryx.tagfusion.cfm.tag.cfTag.render(..)) &&
target(com.naryx.tagfusion.cfm.tag.cfTag);
               
before() : tagExecute(){
 System.out.println( "tagExecute:" + thisJoinPoint.getThis() );
}
}
-------------------------

As you can see i am wanting to capture all the calls to the method
'render' in the class 'com.naryx.tagfusion.cfm.tag.cfTag'.

Which works; however it also picks up other classes that have the same
render() signature, that are *no* where near this package.


So the question is; is this a bug or have i not declared my pointcut
properly?

[not sure if this matters, but i am weaving into class files as oppose
to raw source files]

Thanks for any help you can give,

alan

--
Alan Williamson, City Planner

w: http://www.BLOG-CITY.com/
b: http://alan.blog-city.com/
e: alan@xxxxxxxxxxxxx
p: http://www.blog-city.com/profiles/9.htm

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top