Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] wildcards in type signature of call to interface method

You should also drop the '*' before the '..'. It doesn't do anything useful. It basically means "match 1 package", while '..' means match 0-N packages.

dean

On Jan 3, 2008, at 2:09 AM, Amey Dhoke wrote:

Hi,

The same thing works fine on AspectJ 1.5.4.


On Jan 3, 2008 12:58 PM, janbols <jan.bols@xxxxxxxxxxxxxxxxxxxxxx> wrote:
I would like to match a call to a method defined in an interface.
        IFoo foo = new Foo();
        foo.myMethod();
When specifying the fully qualified name everything works fine:
        pointcut test(): call(public * bar.IFoo.myMethod() ); //mathes
However the following pointcut definitions doesn't work:
        pointcut test(): call(public * *..IFoo.myMethod() ); //doesn't match
Why is that? Can't I use wildcards for the type signature interfaces? Specifying an execution in my pointcut instead of a call does work though:
        pointcut test(): execution(public * *..IFoo.myMethod() ); //mathes
What's wrong here? I'm using JDK1.4 and aspectJ 1.5.1

View this message in context: wildcards in type signature of call to interface method
Sent from the AspectJ - users mailing list archive at Nabble.com.

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


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

Dean Wampler, Ph.D.
dean at objectmentor.com
See also:
http://aquarium.rubyforge.org     AOP for Ruby
http://www.contract4j.org         Design by Contract for Java5




Back to the top