| [aspectj-users] why the !within! in the aspect |
|
According to an answer that I had in this
forum:
For #2, your before advice in Lolo was executing on staticinitialization of the Lolo aspect, which failed because the aspect wasn?t yet initialized. You already figured out the way to avoid the problem J
I was expecting that the following aspect will work
but it still gives the error NoAspectBoundException:
Lolo
Why???? Why I must put the
!within(Lolo)
aspect Lolo
{
pointcut p2(): !staticinitialization(*)&& ! initialization (*.new(..))&&!preinitialization(*.new(..)); before(): p2() {
System.out.println(">>Before the join point:"+thisJoinPoint);
}
class Nadia1
{
|