Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Aspectj JoinPoint
Aspectj JoinPoint [message #674226] Thu, 26 May 2011 08:20 Go to next message
moha  is currently offline moha Friend
Messages: 43
Registered: March 2011
Member
Hi,

I want to define a pointcut in order to select joinpoint that is an execution of methods wich have the package name start with a defined string .

example : package.name.example1111.test.myMethod1(int a)
package.name.example2222.ttttttt.ddddddd.function(String s,boolean flag)

i tried :

@Pointcut("execution (* package.name.*.*(..)))

public void myPointcut() {

}

but it didn't work.

any idea ????

thanks in advance.
Re: Aspectj JoinPoint [message #674474 is a reply to message #674226] Fri, 27 May 2011 05:02 Go to previous message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 382
Registered: July 2009
Senior Member
Two possibilities:

1. I don't know if this is the actual package name that you are using, but 'package' is not allowed in a package name.
2. package.name.*.*(..) will match all methods in all types inside of the package package.name, but it will not match anything in package.name.foo. Instead, you need to do package.name..*.*(..) (notice the extra do).
Previous Topic:Problem to catch exception with aspectj
Next Topic:exclude <clinit> java in pointcut
Goto Forum:
  


Current Time: Tue Apr 23 13:46:01 GMT 2024

Powered by FUDForum. Page generated in 0.02791 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top