Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Inner classes query

Why does the trace for the aspect Foo below show  execution(Foo.Bar(Foo, String)) when I was expecting Foo.Bar(String) ?
 
When I move the inner class outside the aspect, I get the expected behaviour execution(Bar(String))
 
I'm sure I'm missing something :-)
 
Thanks
Neil
 
 
aspect Foo
 {
 
 after(String s) : args(s) && call(public void myMethod(String))
  {
  process(s);
  }
 
 
 public void process(String s)
   {
   Bar p = new Bar(s); // trace on this line of code
   }
  
  class Bar
     {
     public Bar(String s)
      {
      
      }
     }     
  }

Back to the top