Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] 'IF' pointcut to test some arguments

Hello all,

With AspectJ 1.5, can I use the 'if' pointcut like this:
	Object around(Object obj, String myString):
		if("value".equals(myString)) &&
		args(obj, myString) &&		
		call(static Object MyClass.methodA(Object, String)) {
			...
	}
to have a conditional advice?

I've tested the above code, but it seems that the IF pointcut doesn't
work as I expected in this case.

Best regards,

Chanwit

--
Chanwit Kaewkasi
Center for Novel Computing
School of Computer Science
The University of Manchester
Oxford Road
Manchester
M13 9PL, UK


Back to the top