Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ajdt-dev] cflow Below problem

Hi.

> what i wanted to do was that, if the MYBean2.checkStatus() is 
> called in the flow of  MYBean1.deleteObject () the method 
> should not execute....
> 
> here's my Aspect
> 
> public aspect TestAspect {
> 
>    pointcut deleteObject() : 
>         execution(* com.MyBean1.deleteObject(..));
>     
>     pointcut checkReplenishment() : 
>         execution(* com.MyBean2.checkStatus(..));
> 
>    void around() {
>         (cflow(deleteObject()) && checkStatus()) {
>             System.err.println("Pointcut intercepted!!!!..");
>         return;
> }
> 

Well, this does not even compile, right? This is not valid AspectJ
syntax. It must read:

void around() : cflow(deleteObject()) && checkStatus() {
        System.err.println("Pointcut intercepted!!!!..");
        return;
}

Does this not work?

Eric



Back to the top