Hi all,

I am trying to get help with a pointcut I have to write.

Suppose I have two pointcuts:
    pointcut foo() : call(public void HelloWorld.foo());
    pointcut bar() : call(public void HelloWorld.bar());

Furthermore, I have this advice:
    pointcut interesting(String name) : ...
    before(String name) : interesting(name) {
        System.out.println("Going to call method of type " + name);
    }

I want to write the pointcut as (in pseduo-code):
    pointcut interesting(String name) : foo() && name="FOO" || bar() &&
name="BAR";
i.e. when a joinpoint picked out by foo() is encountered I want the name
argument of interesting() to be "FOO".

How do I go about expressing this?

Thanks,
Binil
-- 
View this message in context: 
http://www.nabble.com/Binding-pointcut-arguments-to-static-values-tp23545841p23545841.html
Sent from the AspectJ - users mailing list archive at Nabble.com.

_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to