Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Use aspectj to inject control flow

Hi, I want to write a piece of AspectJ code that adds new control flow to
a sequence of execution such that code like the following:
public String methodA()
{
  method1();
  method2();
  method3();
  method4();
  method5();
  method6();
} 
will behave like the following:
public String methodA()
{
  method1();
  method2();
  if(conditionA)
  { 
    method3();
    method4();
   }else
   {
     method5();
   }
   method6();
}

I remember someone asked a similar question sometime ago. But I couldn't
dig it out. 

Anyone has any suggestions? Thanks a lot.  

Charles Zhang 		(http://www.eecg.utoronto.ca/~czhang)
Dept. of Elec. & Comp. Engineering 
U. of Toronto, Ontario, Canada
*********************************************************
" Yawn!!" (Charles Zhang) 




Back to the top